Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
FSD_CmpFile Class Reference

#include <FSD_CmpFile.hxx>

Inheritance diagram for FSD_CmpFile:

Public Member Functions

 FSD_CmpFile ()
Storage_Error Open (const TCollection_AsciiString &aName, const Storage_OpenMode aMode) override
 returns True if we are at end of the stream
Storage_Error BeginWriteInfoSection () override
 returns True if we are at end of the stream
Storage_Error BeginReadInfoSection () override
 returns True if we are at end of the stream
void WritePersistentObjectHeader (const int aRef, const int aType) override
 returns True if we are at end of the stream
void BeginWritePersistentObjectData () override
 returns True if we are at end of the stream
void BeginWriteObjectData () override
 returns True if we are at end of the stream
void EndWriteObjectData () override
 returns True if we are at end of the stream
void EndWritePersistentObjectData () override
 returns True if we are at end of the stream
void ReadPersistentObjectHeader (int &aRef, int &aType) override
 returns True if we are at end of the stream
void BeginReadPersistentObjectData () override
 returns True if we are at end of the stream
void BeginReadObjectData () override
 returns True if we are at end of the stream
void EndReadObjectData () override
 returns True if we are at end of the stream
void EndReadPersistentObjectData () override
 returns True if we are at end of the stream
void Destroy ()
 ~FSD_CmpFile () override
Public Member Functions inherited from FSD_File
 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.
Storage_Error Open (const TCollection_AsciiString &aName, const Storage_OpenMode aMode) override
 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.
bool IsEnd () override
 returns True if we are at end of the stream
Storage_Position Tell () override
 return position in the file. Return -1 upon error.
Storage_Error BeginWriteInfoSection () override
 returns True if we are at end of the stream
void WriteInfo (const int 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 NCollection_Sequence< TCollection_AsciiString > &userInfo) override
 returns True if we are at end of the stream
Storage_Error EndWriteInfoSection () override
 returns True if we are at end of the stream
Storage_Error BeginReadInfoSection () override
 returns True if we are at end of the stream
void ReadInfo (int &nbObj, TCollection_AsciiString &dbVersion, TCollection_AsciiString &date, TCollection_AsciiString &schemaName, TCollection_AsciiString &schemaVersion, TCollection_ExtendedString &appName, TCollection_AsciiString &appVersion, TCollection_ExtendedString &objectType, NCollection_Sequence< TCollection_AsciiString > &userInfo) override
 returns True if we are at end of the stream
void ReadCompleteInfo (Standard_IStream &theIStream, occ::handle< Storage_Data > &theData) override
 returns True if we are at end of the stream
Storage_Error EndReadInfoSection () override
 returns True if we are at end of the stream
Storage_Error BeginWriteCommentSection () override
 returns True if we are at end of the stream
void WriteComment (const NCollection_Sequence< TCollection_ExtendedString > &userComments) override
 returns True if we are at end of the stream
Storage_Error EndWriteCommentSection () override
 returns True if we are at end of the stream
Storage_Error BeginReadCommentSection () override
 returns True if we are at end of the stream
void ReadComment (NCollection_Sequence< TCollection_ExtendedString > &userComments) override
 returns True if we are at end of the stream
Storage_Error EndReadCommentSection () override
 returns True if we are at end of the stream
Storage_Error BeginWriteTypeSection () override
 returns True if we are at end of the stream
void SetTypeSectionSize (const int aSize) override
 returns True if we are at end of the stream
void WriteTypeInformations (const int typeNum, const TCollection_AsciiString &typeName) override
 returns True if we are at end of the stream
Storage_Error EndWriteTypeSection () override
 returns True if we are at end of the stream
Storage_Error BeginReadTypeSection () override
 returns True if we are at end of the stream
int TypeSectionSize () override
 returns True if we are at end of the stream
void ReadTypeInformations (int &typeNum, TCollection_AsciiString &typeName) override
 returns True if we are at end of the stream
Storage_Error EndReadTypeSection () override
 returns True if we are at end of the stream
Storage_Error BeginWriteRootSection () override
 returns True if we are at end of the stream
void SetRootSectionSize (const int aSize) override
 returns True if we are at end of the stream
void WriteRoot (const TCollection_AsciiString &rootName, const int aRef, const TCollection_AsciiString &aType) override
 returns True if we are at end of the stream
Storage_Error EndWriteRootSection () override
 returns True if we are at end of the stream
Storage_Error BeginReadRootSection () override
 returns True if we are at end of the stream
int RootSectionSize () override
 returns True if we are at end of the stream
void ReadRoot (TCollection_AsciiString &rootName, int &aRef, TCollection_AsciiString &aType) override
 returns True if we are at end of the stream
Storage_Error EndReadRootSection () override
 returns True if we are at end of the stream
Storage_Error BeginWriteRefSection () override
 returns True if we are at end of the stream
void SetRefSectionSize (const int aSize) override
 returns True if we are at end of the stream
void WriteReferenceType (const int reference, const int typeNum) override
 returns True if we are at end of the stream
Storage_Error EndWriteRefSection () override
 returns True if we are at end of the stream
Storage_Error BeginReadRefSection () override
 returns True if we are at end of the stream
int RefSectionSize () override
 returns True if we are at end of the stream
void ReadReferenceType (int &reference, int &typeNum) override
 returns True if we are at end of the stream
Storage_Error EndReadRefSection () override
 returns True if we are at end of the stream
Storage_Error BeginWriteDataSection () override
 returns True if we are at end of the stream
void WritePersistentObjectHeader (const int aRef, const int aType) override
 returns True if we are at end of the stream
void BeginWritePersistentObjectData () override
 returns True if we are at end of the stream
void BeginWriteObjectData () override
 returns True if we are at end of the stream
void EndWriteObjectData () override
 returns True if we are at end of the stream
void EndWritePersistentObjectData () override
 returns True if we are at end of the stream
Storage_Error EndWriteDataSection () override
 returns True if we are at end of the stream
Storage_Error BeginReadDataSection () override
 returns True if we are at end of the stream
void ReadPersistentObjectHeader (int &aRef, int &aType) override
 returns True if we are at end of the stream
void BeginReadPersistentObjectData () override
 returns True if we are at end of the stream
void BeginReadObjectData () override
 returns True if we are at end of the stream
void EndReadObjectData () override
 returns True if we are at end of the stream
void EndReadPersistentObjectData () override
 returns True if we are at end of the stream
Storage_Error EndReadDataSection () override
 returns True if we are at end of the stream
void SkipObject () override
 returns True if we are at end of the stream
Storage_BaseDriver & PutReference (const int aValue) override
Storage_BaseDriver & PutCharacter (const char aValue) override
Storage_BaseDriver & PutExtCharacter (const char16_t aValue) override
Storage_BaseDriver & PutInteger (const int aValue) override
Storage_BaseDriver & PutBoolean (const bool aValue) override
Storage_BaseDriver & PutReal (const double aValue) override
Storage_BaseDriver & PutShortReal (const float aValue) override
Storage_BaseDriver & GetReference (int &aValue) override
Storage_BaseDriver & GetCharacter (char &aValue) override
Storage_BaseDriver & GetExtCharacter (char16_t &aValue) override
Storage_BaseDriver & GetInteger (int &aValue) override
Storage_BaseDriver & GetBoolean (bool &aValue) override
Storage_BaseDriver & GetReal (double &aValue) override
Storage_BaseDriver & GetShortReal (float &aValue) override
Storage_Error Close () override
 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.
void Destroy ()
 ~FSD_File () override
Public Member Functions inherited from Storage_BaseDriver
 ~Storage_BaseDriver () override
TCollection_AsciiString Name () const
Storage_OpenMode OpenMode () const
Storage_BaseDriver & operator<< (const char aValue)
Storage_BaseDriver & operator<< (const char16_t aValue)
Storage_BaseDriver & operator<< (const int aValue)
Storage_BaseDriver & operator<< (const bool aValue)
Storage_BaseDriver & operator<< (const double aValue)
Storage_BaseDriver & operator<< (const float aValue)
Storage_BaseDriver & operator>> (char &aValue)
Storage_BaseDriver & operator>> (char16_t &aValue)
Storage_BaseDriver & operator>> (int &aValue)
Storage_BaseDriver & operator>> (bool &aValue)
Storage_BaseDriver & operator>> (double &aValue)
Storage_BaseDriver & operator>> (float &aValue)
Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
Standard_Transient & operator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
Standard_Transient * This () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
int GetRefCount () const noexcept
 Get the reference counter of this object.
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
virtual void Delete () const
 Memory deallocator for transient classes.

Static Public Member Functions

static Storage_Error IsGoodFileType (const TCollection_AsciiString &aName)
static const char * MagicNumber ()
Static Public Member Functions inherited from FSD_File
static Storage_Error IsGoodFileType (const TCollection_AsciiString &aName)
static const char * MagicNumber ()
Static Public Member Functions inherited from Storage_BaseDriver
static TCollection_AsciiString ReadMagicNumber (Standard_IStream &theIStream)
static constexpr const char * get_type_name ()
 Returns a type descriptor about this object.
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.

Protected Member Functions

void ReadLine (TCollection_AsciiString &buffer) override
 read from the current position to the end of line.
void ReadExtendedLine (TCollection_ExtendedString &buffer) override
 read extended chars (unicode) from the current position to the end of line.
void WriteExtendedLine (const TCollection_ExtendedString &buffer) override
 write from the current position to the end of line.
void ReadString (TCollection_AsciiString &buffer) override
 read from the first none space character position to the end of line.
Protected Member Functions inherited from FSD_File
virtual void ReadWord (TCollection_AsciiString &buffer)
 read from the current position to the next white space or end of line.
virtual void ReadChar (TCollection_AsciiString &buffer, const size_t rsize)
 read <rsize> character from the current position.
virtual void FlushEndOfLine ()
virtual Storage_Error FindTag (const char *const aTag)
 Storage_BaseDriver ()
void SetName (const TCollection_AsciiString &aName)
void SetOpenMode (const Storage_OpenMode aMode)

Additional Inherited Members

typedef void base_type
 Returns a type descriptor about this object.
Protected Attributes inherited from FSD_File
FSD_FStream myStream

Constructor & Destructor Documentation

◆ FSD_CmpFile()

FSD_CmpFile::FSD_CmpFile ( )

◆ ~FSD_CmpFile()

FSD_CmpFile::~FSD_CmpFile ( )
inlineoverride

Member Function Documentation

◆ BeginReadInfoSection()

Storage_Error FSD_CmpFile::BeginReadInfoSection ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ BeginReadObjectData()

void FSD_CmpFile::BeginReadObjectData ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ BeginReadPersistentObjectData()

void FSD_CmpFile::BeginReadPersistentObjectData ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ BeginWriteInfoSection()

Storage_Error FSD_CmpFile::BeginWriteInfoSection ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ BeginWriteObjectData()

void FSD_CmpFile::BeginWriteObjectData ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ BeginWritePersistentObjectData()

void FSD_CmpFile::BeginWritePersistentObjectData ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ Destroy()

void FSD_CmpFile::Destroy ( )

◆ EndReadObjectData()

void FSD_CmpFile::EndReadObjectData ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ EndReadPersistentObjectData()

void FSD_CmpFile::EndReadPersistentObjectData ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ EndWriteObjectData()

void FSD_CmpFile::EndWriteObjectData ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ EndWritePersistentObjectData()

void FSD_CmpFile::EndWritePersistentObjectData ( )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ IsGoodFileType()

Storage_Error FSD_CmpFile::IsGoodFileType ( const TCollection_AsciiString & aName)
static

◆ MagicNumber()

const char * FSD_CmpFile::MagicNumber ( )
static

◆ Open()

Storage_Error FSD_CmpFile::Open ( const TCollection_AsciiString & aName,
const Storage_OpenMode aMode )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ ReadExtendedLine()

void FSD_CmpFile::ReadExtendedLine ( TCollection_ExtendedString & buffer)
overrideprotectedvirtual

read extended chars (unicode) from the current position to the end of line.

Reimplemented from FSD_File.

◆ ReadLine()

void FSD_CmpFile::ReadLine ( TCollection_AsciiString & buffer)
overrideprotectedvirtual

read from the current position to the end of line.

Reimplemented from FSD_File.

◆ ReadPersistentObjectHeader()

void FSD_CmpFile::ReadPersistentObjectHeader ( int & aRef,
int & aType )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.

◆ ReadString()

void FSD_CmpFile::ReadString ( TCollection_AsciiString & buffer)
overrideprotectedvirtual

read from the first none space character position to the end of line.

Reimplemented from FSD_File.

◆ WriteExtendedLine()

void FSD_CmpFile::WriteExtendedLine ( const TCollection_ExtendedString & buffer)
overrideprotectedvirtual

write from the current position to the end of line.

Reimplemented from FSD_File.

◆ WritePersistentObjectHeader()

void FSD_CmpFile::WritePersistentObjectHeader ( const int aRef,
const int aType )
overridevirtual

returns True if we are at end of the stream

Implements Storage_BaseDriver.


The documentation for this class was generated from the following file: