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

FoundationClasses
TKernel
Storage


Storage_Root Class Reference

A root object extracted from a Storage_Data object.
A Storage_Root encapsulates a persistent
object which is a root of a Storage_Data object.
It contains additional information: the name and
the data type of the persistent object.
When retrieving a Storage_Data object from a
container (for example, a file) you access its
roots with the function Roots which returns a
sequence of root objects. The provided functions
allow you to request information about each root of the sequence.
You do not create explicit roots: when inserting
data in a Storage_Data object, you just provide
the persistent object and optionally its name to the function AddRoot.
.

#include <Storage_Root.hxx>

Inheritance diagram for Storage_Root:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT Storage_Root ()
Standard_EXPORT Storage_Root (const TCollection_AsciiString &aName, const Handle(Standard_Persistent)&anObject)
Standard_EXPORT void SetName (const TCollection_AsciiString &aName)
Standard_EXPORT TCollection_AsciiString Name () const
 Returns the name of this root object.
The name may have been given explicitly when
the root was inserted into the Storage_Data
object. If not, the name is a reference number
which was assigned automatically by the driver
when writing the set of data into the container.
When naming the roots, it is easier to retrieve
objects by significant references rather than by
references without any semantic values.
Warning
The returned string will be empty if you call this
function before having named this root object,
either explicitly, or when writing the set of data
into the container.
.
Standard_EXPORT void SetObject (const Handle(Standard_Persistent)&anObject)
Standard_EXPORT Handle_Standard_Persistent Object () const
 Returns the persistent object encapsulated by this root.
.
Standard_EXPORT TCollection_AsciiString Type () const
 Returns the name of this root type.
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Member Functions

Standard_EXPORT void SetReference (const Standard_Integer aRef)
Standard_EXPORT Standard_Integer Reference () const
Standard_EXPORT void SetType (const TCollection_AsciiString &aType)

Private Attributes

TCollection_AsciiString myName
TCollection_AsciiString myType
Handle_Standard_Persistent myObject
Standard_Integer myRef

Constructor & Destructor Documentation

Standard_EXPORT Storage_Root::Storage_Root  ) 
 

Standard_EXPORT Storage_Root::Storage_Root const TCollection_AsciiString aName,
const Handle(Standard_Persistent)&  anObject
 


Member Function Documentation

Standard_EXPORT const Storage_Root::Handle Standard_Type   )  const
 

Reimplemented from MMgt_TShared.

Standard_EXPORT TCollection_AsciiString Storage_Root::Name  )  const
 

Standard_EXPORT Handle_Standard_Persistent Storage_Root::Object  )  const
 

Standard_EXPORT Standard_Integer Storage_Root::Reference  )  const [private]
 

Standard_EXPORT void Storage_Root::SetName const TCollection_AsciiString aName  ) 
 

Standard_EXPORT void Storage_Root::SetObject const Handle(Standard_Persistent)&  anObject  ) 
 

Standard_EXPORT void Storage_Root::SetReference const Standard_Integer  aRef  )  [private]
 

Standard_EXPORT void Storage_Root::SetType const TCollection_AsciiString aType  )  [private]
 

Standard_EXPORT TCollection_AsciiString Storage_Root::Type  )  const
 


Field Documentation

TCollection_AsciiString Storage_Root::myName [private]
 

Handle_Standard_Persistent Storage_Root::myObject [private]
 

Standard_Integer Storage_Root::myRef [private]
 

TCollection_AsciiString Storage_Root::myType [private]
 


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