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

ApplicationFramework
TKTObj
TObj


TObj_TIntSparseArray Class Reference

#include <TObj_TIntSparseArray.hxx>

Inheritance diagram for TObj_TIntSparseArray:

Inheritance graph
[legend]

Public Types

typedef TObj_TIntSparseArray_VecOfData::ConstIterator Iterator

Public Member Functions

Standard_EXPORT TObj_TIntSparseArray ()
 Empty constructor.
Standard_EXPORT const Standard_GUID & ID () const
 Returns the ID of this attribute.
Standard_EXPORT Standard_Integer Size () const
 Methods for access to data Returns the number of stored values in the set.
Iterator GetIterator () const
 Returns iterator on objects contained in the set.
Standard_Boolean HasValue (const Standard_Integer theId) const
 Returns true if the value with the given ID is present.
Standard_Integer Value (const Standard_Integer theId) const
 Returns the value by its ID. Raises an exception if no value is stored with this ID.
Standard_EXPORT void SetValue (const Standard_Integer theId, const Standard_Integer theValue)
 Sets the value with the given ID. Raises an exception if theId is not positive.
Standard_EXPORT void UnsetValue (const Standard_Integer theId)
 Unsets the value with the given ID. Raises an exception if theId is not positive.
Standard_EXPORT void Clear ()
 Clears the set.
Standard_EXPORT Handle (TDF_Attribute) NewEmpty() const
 Redefined OCAF abstract methods Returns an new empty TObj_TIntSparseArray attribute. It is used by the copy algorithm.
Standard_EXPORT Handle (TDF_Attribute) BackupCopy() const
 Moves this delta into a new other attribute.
Standard_EXPORT void Restore (const Handle(TDF_Attribute)&theDelta)
 Restores the set using info saved in backup attribute theDelta.
Standard_EXPORT void Paste (const Handle(TDF_Attribute)&theInto, const Handle(TDF_RelocationTable)&theRT) const
 This method is used when copying an attribute from a source structure into a target structure.
Standard_EXPORT void BeforeCommitTransaction ()
 It is called just before Commit or Abort transaction and does Backup() to create a delta.
Standard_EXPORT void DeltaOnModification (const Handle(TDF_DeltaOnModification)&theDelta)
 Applies theDelta to this.
Standard_EXPORT Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)&theDelta, const Standard_Boolean toForce)
 Clears my modification delta; called after application of theDelta.
void SetDoBackup (const Standard_Boolean toDo)
 Methods to handle the modification delta Sets the flag pointing to the necessity to maintain a modification delta. It is called by the retrieval driver.
void ClearDelta ()

Static Public Member Functions

static Standard_EXPORT const
Standard_GUID & 
GetID ()
 This method is used in implementation of ID().
static Standard_EXPORT Handle (TObj_TIntSparseArray) Set(const TDF_Label &theLabel)
 Creates TObj_TIntSparseArray attribute on given label.

Private Types

enum  { AbsentValue = -1 }
 Internal constant to recognize items in the backup array correspondent to absent values. More...

Private Member Functions

void backupValue (const Standard_Integer theId, const Standard_Integer theCurrValue, const Standard_Integer theNewValue)
 backup one value

Private Attributes

TObj_TIntSparseArray_VecOfData myVector
TObj_TIntSparseArray_MapOfData myOldMap
Standard_Boolean myDoBackup

Detailed Description

OCAF Attribute to store a set of positive integer values in the OCAF tree. Each value is identified by ID (positive integer). The supporting underlying data structure is NCollection_SparseArray of integers.


Member Typedef Documentation

typedef TObj_TIntSparseArray_VecOfData::ConstIterator TObj_TIntSparseArray::Iterator
 


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
AbsentValue 


Constructor & Destructor Documentation

Standard_EXPORT TObj_TIntSparseArray::TObj_TIntSparseArray  ) 
 


Member Function Documentation

Standard_EXPORT Standard_Boolean TObj_TIntSparseArray::AfterUndo const Handle(TDF_AttributeDelta)&  theDelta,
const Standard_Boolean  toForce
[virtual]
 

Reimplemented from TDF_Attribute.

void TObj_TIntSparseArray::backupValue const Standard_Integer  theId,
const Standard_Integer  theCurrValue,
const Standard_Integer  theNewValue
[private]
 

Standard_EXPORT void TObj_TIntSparseArray::BeforeCommitTransaction  )  [virtual]
 

Reimplemented from TDF_Attribute.

Standard_EXPORT void TObj_TIntSparseArray::Clear  ) 
 

void TObj_TIntSparseArray::ClearDelta  )  [inline]
 

Standard_EXPORT void TObj_TIntSparseArray::DeltaOnModification const Handle(TDF_DeltaOnModification)&  theDelta  )  [virtual]
 

Reimplemented from TDF_Attribute.

static Standard_EXPORT const Standard_GUID& TObj_TIntSparseArray::GetID  )  [static]
 

Iterator TObj_TIntSparseArray::GetIterator  )  const [inline]
 

Standard_EXPORT TObj_TIntSparseArray::Handle TDF_Attribute   )  const
 

Standard_EXPORT TObj_TIntSparseArray::Handle TDF_Attribute   )  const
 

static Standard_EXPORT TObj_TIntSparseArray::Handle TObj_TIntSparseArray   )  const [static]
 

Standard_Boolean TObj_TIntSparseArray::HasValue const Standard_Integer  theId  )  const [inline]
 

Standard_EXPORT const Standard_GUID& TObj_TIntSparseArray::ID  )  const [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT void TObj_TIntSparseArray::Paste const Handle(TDF_Attribute)&  theInto,
const Handle(TDF_RelocationTable)&  theRT
const [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT void TObj_TIntSparseArray::Restore const Handle(TDF_Attribute)&  theDelta  )  [virtual]
 

Implements TDF_Attribute.

void TObj_TIntSparseArray::SetDoBackup const Standard_Boolean  toDo  )  [inline]
 

Standard_EXPORT void TObj_TIntSparseArray::SetValue const Standard_Integer  theId,
const Standard_Integer  theValue
 

Standard_EXPORT Standard_Integer TObj_TIntSparseArray::Size  )  const [inline]
 

Standard_EXPORT void TObj_TIntSparseArray::UnsetValue const Standard_Integer  theId  ) 
 

Standard_Integer TObj_TIntSparseArray::Value const Standard_Integer  theId  )  const [inline]
 


Field Documentation

Standard_Boolean TObj_TIntSparseArray::myDoBackup [private]
 

TObj_TIntSparseArray_MapOfData TObj_TIntSparseArray::myOldMap [private]
 

TObj_TIntSparseArray_VecOfData TObj_TIntSparseArray::myVector [private]
 


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