Open CASCADE Technology Reference Manual 8.0.0.dev-68d3dc89
 
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
StdStorage Class Reference

StdStorage package is used to write and read persistent objects. These objects are read and written by a retrieval or storage algorithm (compatible with legacy Storage_Schema) in a container (disk, memory, network ...). Drivers (FSD_File objects) assign a physical container for data to be stored or retrieved. The standard procedure for an application in reading a container is to call one of the Read functions providing either a file path or a driver opened for reading. Thes function update the instance of the StdStorage_Data class which contains the data being read. The standard procedure for an application in writing a container is the following: More...

#include <StdStorage.hxx>

Static Public Member Functions

static TCollection_AsciiString Version ()
 Returns the version of Storage's read/write routines.
 
static Storage_Error Read (const TCollection_AsciiString &theFileName, Handle< StdStorage_Data > &theData)
 Returns the data read from a file located at theFileName. The storage format is compartible with legacy persistent one. These data are aggregated in a StdStorage_Data object which may be browsed in order to extract the root objects from the container. Note: - theData object will be created if it is null or cleared otherwise.
 
static Storage_Error Read (const Handle< Storage_BaseDriver > &theDriver, Handle< StdStorage_Data > &theData)
 Returns the data read from the container defined by theDriver. The storage format is compartible with legacy persistent one. These data are aggregated in a StdStorage_Data object which may be browsed in order to extract the root objects from the container. Note: - theData object will be created if it is null or cleared otherwise.
 
static Storage_Error Write (const Handle< Storage_BaseDriver > &theDriver, const Handle< StdStorage_Data > &theData)
 Writes the data aggregated in theData object into the container defined by theDriver. The storage format is compartible with legacy persistent one. Note: - theData may aggregate several root objects to be stored together.
 

Detailed Description

StdStorage package is used to write and read persistent objects. These objects are read and written by a retrieval or storage algorithm (compatible with legacy Storage_Schema) in a container (disk, memory, network ...). Drivers (FSD_File objects) assign a physical container for data to be stored or retrieved. The standard procedure for an application in reading a container is to call one of the Read functions providing either a file path or a driver opened for reading. Thes function update the instance of the StdStorage_Data class which contains the data being read. The standard procedure for an application in writing a container is the following:

  • open the driver in writing mode,
  • create an instance of the StdStorage_Data class, then add the persistent data to write with the function AddRoot,
  • call the function Write from the storage, setting the driver and the Storage_Data instance as parameters,
  • close the driver.

Member Function Documentation

◆ Read() [1/2]

static Storage_Error StdStorage::Read ( const Handle< Storage_BaseDriver > & theDriver,
Handle< StdStorage_Data > & theData )
static

Returns the data read from the container defined by theDriver. The storage format is compartible with legacy persistent one. These data are aggregated in a StdStorage_Data object which may be browsed in order to extract the root objects from the container. Note: - theData object will be created if it is null or cleared otherwise.

◆ Read() [2/2]

static Storage_Error StdStorage::Read ( const TCollection_AsciiString & theFileName,
Handle< StdStorage_Data > & theData )
static

Returns the data read from a file located at theFileName. The storage format is compartible with legacy persistent one. These data are aggregated in a StdStorage_Data object which may be browsed in order to extract the root objects from the container. Note: - theData object will be created if it is null or cleared otherwise.

◆ Version()

static TCollection_AsciiString StdStorage::Version ( )
static

Returns the version of Storage's read/write routines.

◆ Write()

static Storage_Error StdStorage::Write ( const Handle< Storage_BaseDriver > & theDriver,
const Handle< StdStorage_Data > & theData )
static

Writes the data aggregated in theData object into the container defined by theDriver. The storage format is compartible with legacy persistent one. Note: - theData may aggregate several root objects to be stored together.

  • createion date specified in the srorage header will be overwritten.

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