OCC Main Page | FoundationClasses | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FoundationClasses
TKernel
FSD


FSD_File Class Reference

A general driver which defines as a file, the
physical container for data to be stored or retrieved.
.

#include <FSD_File.hxx>

Inheritance diagram for FSD_File:

Inheritance graph
[legend]

Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT FSD_File ()
 Constructs a driver defining as a file, the physical
container for data to be stored or retrieved.
Use the function Open to give the name of the driven file.
.
Standard_EXPORT Storage_Error Open (const TCollection_AsciiString &aName, const Storage_OpenMode aMode)
 Assigns as aName the name of the file to be
driven by this driver. aMode precises if the file is
opened in read or write mode.
The function returns Storage_VSOk if the file
is opened correctly, or any other value of the
Storage_Error enumeration which specifies the problem encountered.
.
Standard_EXPORT Standard_Boolean IsEnd ()
 returns True if we are at end of the stream

Standard_EXPORT Storage_Position Tell ()
 return position in the file. Return -1 upon error.

Standard_EXPORT Storage_Error BeginWriteInfoSection ()
Standard_EXPORT void WriteInfo (const Standard_Integer nbObj, const TCollection_AsciiString &dbVersion, const TCollection_AsciiString &date, const TCollection_AsciiString &schemaName, const TCollection_AsciiString &schemaVersion, const TCollection_ExtendedString &appName, const TCollection_AsciiString &appVersion, const TCollection_ExtendedString &objectType, const TColStd_SequenceOfAsciiString &userInfo)
Standard_EXPORT Storage_Error EndWriteInfoSection ()
Standard_EXPORT Storage_Error BeginReadInfoSection ()
Standard_EXPORT void ReadInfo (Standard_Integer &nbObj, TCollection_AsciiString &dbVersion, TCollection_AsciiString &date, TCollection_AsciiString &schemaName, TCollection_AsciiString &schemaVersion, TCollection_ExtendedString &appName, TCollection_AsciiString &appVersion, TCollection_ExtendedString &objectType, TColStd_SequenceOfAsciiString &userInfo)
Standard_EXPORT Storage_Error EndReadInfoSection ()
Standard_EXPORT Storage_Error BeginWriteCommentSection ()
Standard_EXPORT void WriteComment (const TColStd_SequenceOfExtendedString &userComments)
Standard_EXPORT Storage_Error EndWriteCommentSection ()
Standard_EXPORT Storage_Error BeginReadCommentSection ()
Standard_EXPORT void ReadComment (TColStd_SequenceOfExtendedString &userComments)
Standard_EXPORT Storage_Error EndReadCommentSection ()
Standard_EXPORT Storage_Error BeginWriteTypeSection ()
Standard_EXPORT void SetTypeSectionSize (const Standard_Integer aSize)
Standard_EXPORT void WriteTypeInformations (const Standard_Integer typeNum, const TCollection_AsciiString &typeName)
Standard_EXPORT Storage_Error EndWriteTypeSection ()
Standard_EXPORT Storage_Error BeginReadTypeSection ()
Standard_EXPORT Standard_Integer TypeSectionSize ()
Standard_EXPORT void ReadTypeInformations (Standard_Integer &typeNum, TCollection_AsciiString &typeName)
Standard_EXPORT Storage_Error EndReadTypeSection ()
Standard_EXPORT Storage_Error BeginWriteRootSection ()
Standard_EXPORT void SetRootSectionSize (const Standard_Integer aSize)
Standard_EXPORT void WriteRoot (const TCollection_AsciiString &rootName, const Standard_Integer aRef, const TCollection_AsciiString &aType)
Standard_EXPORT Storage_Error EndWriteRootSection ()
Standard_EXPORT Storage_Error BeginReadRootSection ()
Standard_EXPORT Standard_Integer RootSectionSize ()
Standard_EXPORT void ReadRoot (TCollection_AsciiString &rootName, Standard_Integer &aRef, TCollection_AsciiString &aType)
Standard_EXPORT Storage_Error EndReadRootSection ()
Standard_EXPORT Storage_Error BeginWriteRefSection ()
Standard_EXPORT void SetRefSectionSize (const Standard_Integer aSize)
Standard_EXPORT void WriteReferenceType (const Standard_Integer reference, const Standard_Integer typeNum)
Standard_EXPORT Storage_Error EndWriteRefSection ()
Standard_EXPORT Storage_Error BeginReadRefSection ()
Standard_EXPORT Standard_Integer RefSectionSize ()
Standard_EXPORT void ReadReferenceType (Standard_Integer &reference, Standard_Integer &typeNum)
Standard_EXPORT Storage_Error EndReadRefSection ()
Standard_EXPORT Storage_Error BeginWriteDataSection ()
Standard_EXPORT void WritePersistentObjectHeader (const Standard_Integer aRef, const Standard_Integer aType)
Standard_EXPORT void BeginWritePersistentObjectData ()
Standard_EXPORT void BeginWriteObjectData ()
Standard_EXPORT void EndWriteObjectData ()
Standard_EXPORT void EndWritePersistentObjectData ()
Standard_EXPORT Storage_Error EndWriteDataSection ()
Standard_EXPORT Storage_Error BeginReadDataSection ()
Standard_EXPORT void ReadPersistentObjectHeader (Standard_Integer &aRef, Standard_Integer &aType)
Standard_EXPORT void BeginReadPersistentObjectData ()
Standard_EXPORT void BeginReadObjectData ()
Standard_EXPORT void EndReadObjectData ()
Standard_EXPORT void EndReadPersistentObjectData ()
Standard_EXPORT Storage_Error EndReadDataSection ()
Standard_EXPORT void SkipObject ()
Standard_EXPORT Storage_BaseDriver & PutReference (const Standard_Integer aValue)
Standard_EXPORT Storage_BaseDriver & PutCharacter (const Standard_Character aValue)
Storage_BaseDriver & operator<< (const Standard_Character aValue)
Standard_EXPORT Storage_BaseDriver & PutExtCharacter (const Standard_ExtCharacter aValue)
Storage_BaseDriver & operator<< (const Standard_ExtCharacter aValue)
Standard_EXPORT Storage_BaseDriver & PutInteger (const Standard_Integer aValue)
Storage_BaseDriver & operator<< (const Standard_Integer aValue)
Standard_EXPORT Storage_BaseDriver & PutBoolean (const Standard_Boolean aValue)
Storage_BaseDriver & operator<< (const Standard_Boolean aValue)
Standard_EXPORT Storage_BaseDriver & PutReal (const Standard_Real aValue)
Storage_BaseDriver & operator<< (const Standard_Real aValue)
Standard_EXPORT Storage_BaseDriver & PutShortReal (const Standard_ShortReal aValue)
Storage_BaseDriver & operator<< (const Standard_ShortReal aValue)
Standard_EXPORT Storage_BaseDriver & GetReference (Standard_Integer &aValue)
Standard_EXPORT Storage_BaseDriver & GetCharacter (Standard_Character &aValue)
Storage_BaseDriver & operator>> (Standard_Character &aValue)
Standard_EXPORT Storage_BaseDriver & GetExtCharacter (Standard_ExtCharacter &aValue)
Storage_BaseDriver & operator>> (Standard_ExtCharacter &aValue)
Standard_EXPORT Storage_BaseDriver & GetInteger (Standard_Integer &aValue)
Storage_BaseDriver & operator>> (Standard_Integer &aValue)
Standard_EXPORT Storage_BaseDriver & GetBoolean (Standard_Boolean &aValue)
Storage_BaseDriver & operator>> (Standard_Boolean &aValue)
Standard_EXPORT Storage_BaseDriver & GetReal (Standard_Real &aValue)
Storage_BaseDriver & operator>> (Standard_Real &aValue)
Standard_EXPORT Storage_BaseDriver & GetShortReal (Standard_ShortReal &aValue)
Storage_BaseDriver & operator>> (Standard_ShortReal &aValue)
Standard_EXPORT Storage_Error Close ()
 Closes the file driven by this driver. This file was
opened by the last call to the function Open.
The function returns Storage_VSOk if the
closure is correctly done, or any other value of
the Storage_Error enumeration which specifies the problem encountered.
.
Standard_EXPORT void Destroy ()
 ~FSD_File ()

Static Public Member Functions

static Standard_EXPORT Storage_Error IsGoodFileType (const TCollection_AsciiString &aName)

Protected Member Functions

Standard_EXPORT void ReadLine (TCollection_AsciiString &buffer)
 read from the current position to the end of line.

Standard_EXPORT void ReadWord (TCollection_AsciiString &buffer)
 read from the current position to the next white space or end of line.

Standard_EXPORT void ReadExtendedLine (TCollection_ExtendedString &buffer)
 read extended chars (unicode) from the current position to the end of line.

Standard_EXPORT void WriteExtendedLine (const TCollection_ExtendedString &buffer)
 write from the current position to the end of line.

Standard_EXPORT void ReadChar (TCollection_AsciiString &buffer, const Standard_Integer rsize)
 read <rsize> character from the current position.

Standard_EXPORT void ReadString (TCollection_AsciiString &buffer)
 read from the first none space character position to the end of line.

Standard_EXPORT void FlushEndOfLine ()
Standard_EXPORT Storage_Error FindTag (const Standard_CString aTag)

Static Private Member Functions

static Standard_EXPORT const
Standard_CString 
MagicNumber ()

Private Attributes

FSD_FStream myStream

Constructor & Destructor Documentation

Standard_EXPORT FSD_File::FSD_File (   ) 
 

FSD_File::~FSD_File (   )  [inline]
 


Member Function Documentation

Standard_EXPORT Storage_Error FSD_File::BeginReadCommentSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginReadDataSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginReadInfoSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::BeginReadObjectData (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::BeginReadPersistentObjectData (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginReadRefSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginReadRootSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginReadTypeSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginWriteCommentSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginWriteDataSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginWriteInfoSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::BeginWriteObjectData (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::BeginWritePersistentObjectData (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginWriteRefSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginWriteRootSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::BeginWriteTypeSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::Close (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::Destroy (   ) 
 

Standard_EXPORT Storage_Error FSD_File::EndReadCommentSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndReadDataSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndReadInfoSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::EndReadObjectData (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::EndReadPersistentObjectData (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndReadRefSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndReadRootSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndReadTypeSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndWriteCommentSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndWriteDataSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndWriteInfoSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::EndWriteObjectData (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::EndWritePersistentObjectData (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndWriteRefSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndWriteRootSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::EndWriteTypeSection (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Error FSD_File::FindTag (  const Standard_CString  aTag  )  [protected]
 

Standard_EXPORT void FSD_File::FlushEndOfLine (   )  [protected]
 

Standard_EXPORT Storage_BaseDriver& FSD_File::GetBoolean (  Standard_Boolean &  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::GetCharacter (  Standard_Character &  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::GetExtCharacter (  Standard_ExtCharacter &  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::GetInteger (  Standard_Integer &  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::GetReal (  Standard_Real &  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::GetReference (  Standard_Integer &  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::GetShortReal (  Standard_ShortReal &  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Standard_Boolean FSD_File::IsEnd (   )  [virtual]
 

Implements Storage_BaseDriver.

static Standard_EXPORT Storage_Error FSD_File::IsGoodFileType (  const TCollection_AsciiString &  aName  )  [static]
 

static Standard_EXPORT const Standard_CString FSD_File::MagicNumber (   )  [static, private]
 

Standard_EXPORT Storage_Error FSD_File::Open (  const TCollection_AsciiString &  aName,
const Storage_OpenMode  aMode
)  [virtual]
 

Implements Storage_BaseDriver.

void FSD_File::operator delete (  void *  anAddress  )  [inline]
 

Reimplemented from Storage_BaseDriver.

void* FSD_File::operator new (  size_t  size  )  [inline]
 

Reimplemented from Storage_BaseDriver.

void* FSD_File::operator new (  size_t  ,
void *  anAddress
)  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator<< (  const Standard_ShortReal  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator<< (  const Standard_Real  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator<< (  const Standard_Boolean  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator<< (  const Standard_Integer  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator<< (  const Standard_ExtCharacter  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator<< (  const Standard_Character  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator>> (  Standard_ShortReal &  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator>> (  Standard_Real &  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator>> (  Standard_Boolean &  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator>> (  Standard_Integer &  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator>> (  Standard_ExtCharacter &  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Storage_BaseDriver& FSD_File::operator>> (  Standard_Character &  aValue  )  [inline]
 

Reimplemented from Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::PutBoolean (  const Standard_Boolean  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::PutCharacter (  const Standard_Character  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::PutExtCharacter (  const Standard_ExtCharacter  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::PutInteger (  const Standard_Integer  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::PutReal (  const Standard_Real  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::PutReference (  const Standard_Integer  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_BaseDriver& FSD_File::PutShortReal (  const Standard_ShortReal  aValue  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::ReadChar (  TCollection_AsciiString &  buffer,
const Standard_Integer  rsize
)  [protected]
 

Standard_EXPORT void FSD_File::ReadComment (  TColStd_SequenceOfExtendedString &  userComments  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::ReadExtendedLine (  TCollection_ExtendedString &  buffer  )  [protected]
 

Standard_EXPORT void FSD_File::ReadInfo (  Standard_Integer &  nbObj,
TCollection_AsciiString &  dbVersion,
TCollection_AsciiString &  date,
TCollection_AsciiString &  schemaName,
TCollection_AsciiString &  schemaVersion,
TCollection_ExtendedString &  appName,
TCollection_AsciiString &  appVersion,
TCollection_ExtendedString &  objectType,
TColStd_SequenceOfAsciiString &  userInfo
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::ReadLine (  TCollection_AsciiString &  buffer  )  [protected]
 

Standard_EXPORT void FSD_File::ReadPersistentObjectHeader (  Standard_Integer &  aRef,
Standard_Integer &  aType
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::ReadReferenceType (  Standard_Integer &  reference,
Standard_Integer &  typeNum
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::ReadRoot (  TCollection_AsciiString &  rootName,
Standard_Integer &  aRef,
TCollection_AsciiString &  aType
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::ReadString (  TCollection_AsciiString &  buffer  )  [protected]
 

Standard_EXPORT void FSD_File::ReadTypeInformations (  Standard_Integer &  typeNum,
TCollection_AsciiString &  typeName
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::ReadWord (  TCollection_AsciiString &  buffer  )  [protected]
 

Standard_EXPORT Standard_Integer FSD_File::RefSectionSize (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Standard_Integer FSD_File::RootSectionSize (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::SetRefSectionSize (  const Standard_Integer  aSize  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::SetRootSectionSize (  const Standard_Integer  aSize  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::SetTypeSectionSize (  const Standard_Integer  aSize  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::SkipObject (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Storage_Position FSD_File::Tell (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT Standard_Integer FSD_File::TypeSectionSize (   )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::WriteComment (  const TColStd_SequenceOfExtendedString &  userComments  )  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::WriteExtendedLine (  const TCollection_ExtendedString &  buffer  )  [protected]
 

Standard_EXPORT void FSD_File::WriteInfo (  const Standard_Integer  nbObj,
const TCollection_AsciiString &  dbVersion,
const TCollection_AsciiString &  date,
const TCollection_AsciiString &  schemaName,
const TCollection_AsciiString &  schemaVersion,
const TCollection_ExtendedString &  appName,
const TCollection_AsciiString &  appVersion,
const TCollection_ExtendedString &  objectType,
const TColStd_SequenceOfAsciiString &  userInfo
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::WritePersistentObjectHeader (  const Standard_Integer  aRef,
const Standard_Integer  aType
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::WriteReferenceType (  const Standard_Integer  reference,
const Standard_Integer  typeNum
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::WriteRoot (  const TCollection_AsciiString &  rootName,
const Standard_Integer  aRef,
const TCollection_AsciiString &  aType
)  [virtual]
 

Implements Storage_BaseDriver.

Standard_EXPORT void FSD_File::WriteTypeInformations (  const Standard_Integer  typeNum,
const TCollection_AsciiString &  typeName
)  [virtual]
 

Implements Storage_BaseDriver.


Field Documentation

FSD_FStream FSD_File::myStream [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:12:40 2008 for OpenCASCADE by  doxygen 1.4.1