Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
BinObjMgt_Persistent Class Reference

Binary persistent representation of an object.
Really it is used as a buffer for read/write an object.

It takes care of Little/Big endian by inversing bytes
in objects of standard types (see FSD_FileHeader.hxx
for the default value of DO_INVERSE).

#include <BinObjMgt_Persistent.hxx>

Public Member Functions

DEFINE_STANDARD_ALLOC BinObjMgt_Persistent ()
 Empty constructor

BinObjMgt_PersistentPutCharacter (const Standard_Character theValue)
BinObjMgt_Persistentoperator<< (const Standard_Character theValue)
BinObjMgt_PersistentPutByte (const Standard_Byte theValue)
BinObjMgt_Persistentoperator<< (const Standard_Byte theValue)
BinObjMgt_PersistentPutExtCharacter (const Standard_ExtCharacter theValue)
BinObjMgt_Persistentoperator<< (const Standard_ExtCharacter theValue)
BinObjMgt_PersistentPutInteger (const Standard_Integer theValue)
BinObjMgt_Persistentoperator<< (const Standard_Integer theValue)
BinObjMgt_PersistentPutBoolean (const Standard_Boolean theValue)
BinObjMgt_Persistentoperator<< (const Standard_Boolean theValue)
BinObjMgt_PersistentPutReal (const Standard_Real theValue)
BinObjMgt_Persistentoperator<< (const Standard_Real theValue)
BinObjMgt_PersistentPutShortReal (const Standard_ShortReal theValue)
BinObjMgt_Persistentoperator<< (const Standard_ShortReal theValue)
BinObjMgt_PersistentPutCString (const Standard_CString theValue)
 Offset in output buffer is not aligned

BinObjMgt_Persistentoperator<< (const Standard_CString theValue)
BinObjMgt_PersistentPutAsciiString (const TCollection_AsciiString &theValue)
 Offset in output buffer is word-aligned

BinObjMgt_Persistentoperator<< (const TCollection_AsciiString &theValue)
BinObjMgt_PersistentPutExtendedString (const TCollection_ExtendedString &theValue)
 Offset in output buffer is word-aligned

BinObjMgt_Persistentoperator<< (const TCollection_ExtendedString &theValue)
BinObjMgt_PersistentPutLabel (const TDF_Label &theValue)
BinObjMgt_Persistentoperator<< (const TDF_Label &theValue)
BinObjMgt_PersistentPutGUID (const Standard_GUID &theValue)
BinObjMgt_Persistentoperator<< (const Standard_GUID &theValue)
BinObjMgt_PersistentPutCharArray (const BinObjMgt_PChar theArray, const Standard_Integer theLength)
 Put C array of char, theLength is the number of elements

BinObjMgt_PersistentPutByteArray (const BinObjMgt_PByte theArray, const Standard_Integer theLength)
 Put C array of unsigned chars, theLength is the number of elements

BinObjMgt_PersistentPutExtCharArray (const BinObjMgt_PExtChar theArray, const Standard_Integer theLength)
 Put C array of ExtCharacter, theLength is the number of elements

BinObjMgt_PersistentPutIntArray (const BinObjMgt_PInteger theArray, const Standard_Integer theLength)
 Put C array of int, theLength is the number of elements

BinObjMgt_PersistentPutRealArray (const BinObjMgt_PReal theArray, const Standard_Integer theLength)
 Put C array of double, theLength is the number of elements

BinObjMgt_PersistentPutShortRealArray (const BinObjMgt_PShortReal theArray, const Standard_Integer theLength)
 Put C array of float, theLength is the number of elements

const BinObjMgt_PersistentGetCharacter (Standard_Character &theValue) const
const BinObjMgt_Persistentoperator>> (Standard_Character &theValue) const
const BinObjMgt_PersistentGetByte (Standard_Byte &theValue) const
const BinObjMgt_Persistentoperator>> (Standard_Byte &theValue) const
const BinObjMgt_PersistentGetExtCharacter (Standard_ExtCharacter &theValue) const
const BinObjMgt_Persistentoperator>> (Standard_ExtCharacter &theValue) const
const BinObjMgt_PersistentGetInteger (Standard_Integer &theValue) const
const BinObjMgt_Persistentoperator>> (Standard_Integer &theValue) const
const BinObjMgt_PersistentGetBoolean (Standard_Boolean &theValue) const
const BinObjMgt_Persistentoperator>> (Standard_Boolean &theValue) const
const BinObjMgt_PersistentGetReal (Standard_Real &theValue) const
const BinObjMgt_Persistentoperator>> (Standard_Real &theValue) const
const BinObjMgt_PersistentGetShortReal (Standard_ShortReal &theValue) const
const BinObjMgt_Persistentoperator>> (Standard_ShortReal &theValue) const
const BinObjMgt_PersistentGetAsciiString (TCollection_AsciiString &theValue) const
const BinObjMgt_Persistentoperator>> (TCollection_AsciiString &theValue) const
const BinObjMgt_PersistentGetExtendedString (TCollection_ExtendedString &theValue) const
const BinObjMgt_Persistentoperator>> (TCollection_ExtendedString &theValue) const
const BinObjMgt_PersistentGetLabel (const Handle< TDF_Data > &theDS, TDF_Label &theValue) const
const BinObjMgt_PersistentGetGUID (Standard_GUID &theValue) const
const BinObjMgt_Persistentoperator>> (Standard_GUID &theValue) const
const BinObjMgt_PersistentGetCharArray (const BinObjMgt_PChar theArray, const Standard_Integer theLength) const
 Get C array of char, theLength is the number of elements;
theArray must point to a
space enough to place theLength elements

const BinObjMgt_PersistentGetByteArray (const BinObjMgt_PByte theArray, const Standard_Integer theLength) const
 Get C array of unsigned chars, theLength is the number of elements;
theArray must point to a
space enough to place theLength elements

const BinObjMgt_PersistentGetExtCharArray (const BinObjMgt_PExtChar theArray, const Standard_Integer theLength) const
 Get C array of ExtCharacter, theLength is the number of elements;
theArray must point to a
space enough to place theLength elements

const BinObjMgt_PersistentGetIntArray (const BinObjMgt_PInteger theArray, const Standard_Integer theLength) const
 Get C array of int, theLength is the number of elements;
theArray must point to a
space enough to place theLength elements

const BinObjMgt_PersistentGetRealArray (const BinObjMgt_PReal theArray, const Standard_Integer theLength) const
 Get C array of double, theLength is the number of elements;
theArray must point to a
space enough to place theLength elements

const BinObjMgt_PersistentGetShortRealArray (const BinObjMgt_PShortReal theArray, const Standard_Integer theLength) const
 Get C array of float, theLength is the number of elements;
theArray must point to a
space enough to place theLength elements

Standard_Integer Position () const
 Tells the current position for get/put

Standard_Boolean SetPosition (const Standard_Integer thePos) const
 Sets the current position for get/put.
Resets an error state depending on the validity of thePos.
Returns the new state (value of IsOK())

void Truncate ()
 Truncates the buffer by current position,
i.e. updates mySize

Standard_Boolean IsError () const
 Indicates an error after Get methods or SetPosition

Standard_Boolean operator! () const
Standard_Boolean IsOK () const
 Indicates a good state after Get methods or SetPosition

 operator Standard_Boolean () const
void Init ()
 Initializes me to reuse again

void SetId (const Standard_Integer theId)
 Sets the Id of the object

void SetTypeId (const Standard_Integer theId)
 Sets the Id of the type of the object

Standard_Integer Id () const
 Returns the Id of the object

Standard_Integer TypeId () const
 Returns the Id of the type of the object

Standard_Integer Length () const
 Returns the length of data

Standard_OStreamWrite (Standard_OStream &theOS)
 Stores <me> to the stream.
inline Standard_OStream& operator<< (Standard_OStream&,
BinObjMgt_Persistent&) is also available

Standard_IStreamRead (Standard_IStream &theIS)
 Retrieves <me> from the stream.
inline Standard_IStream& operator>> (Standard_IStream&,
BinObjMgt_Persistent&) is also available

void Destroy ()
 Frees the allocated memory;
This object can be reused after call to Init

 ~BinObjMgt_Persistent ()

Constructor & Destructor Documentation


Member Function Documentation

BinObjMgt_Persistent::operator Standard_Boolean ( ) const [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_Character  theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_Byte  theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_ExtCharacter  theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_Integer  theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_Boolean  theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_Real  theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_ShortReal  theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_CString  theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const TCollection_AsciiString theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const TCollection_ExtendedString theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const TDF_Label theValue) [inline]
BinObjMgt_Persistent& BinObjMgt_Persistent::operator<< ( const Standard_GUID theValue) [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( Standard_Character theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( Standard_Byte theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( Standard_ExtCharacter theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( Standard_Integer theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( Standard_Boolean theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( Standard_Real theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( Standard_ShortReal theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( TCollection_AsciiString theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( TCollection_ExtendedString theValue) const [inline]
const BinObjMgt_Persistent& BinObjMgt_Persistent::operator>> ( Standard_GUID theValue) const [inline]

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