Open CASCADE Technology  6.9.0
Public Member Functions

Interface_EntityCluster Class Reference

Auxiliary class for EntityList. An EntityList designates an EntityCluster, which brings itself an fixed maximum count of Entities. If it is full, it gives access to another cluster ("Next"). This class is intended to give a good compromise between access time (faster than a Sequence, good for little count) and memory use (better than a Sequence in any case, overall for little count, better than an Array for a very little count. It is designed for a light management. Remark that a new Item may not be Null, because this is the criterium used for "End of List". More...

#include <Interface_EntityCluster.hxx>

Inheritance diagram for Interface_EntityCluster:
Inheritance graph
[legend]

Public Member Functions

 Interface_EntityCluster ()
 Creates an empty, non-chained, EntityCluster. More...
 
 Interface_EntityCluster (const Handle< Standard_Transient > &ent)
 Creates a non-chained EntityCluster, filled with one Entity. More...
 
 Interface_EntityCluster (const Handle< Interface_EntityCluster > &ec)
 Creates an empty EntityCluster, chained with another one (that is, put BEFORE this other one in the list) More...
 
 Interface_EntityCluster (const Handle< Standard_Transient > &ant, const Handle< Interface_EntityCluster > &ec)
 Creates an EntityCluster, filled with a first Entity, and chained to another EntityCluster (BEFORE it, as above) More...
 
void Append (const Handle< Standard_Transient > &ent)
 Appends an Entity to the Cluster. If it is not full, adds the entity directly inside itself. Else, transmits to its Next and Creates it if it does not yet exist. More...
 
Standard_Boolean Remove (const Handle< Standard_Transient > &ent)
 Removes an Entity from the Cluster. If it is not found, calls its Next one to do so. Returns True if it becomes itself empty, False else (thus, a Cluster which becomes empty is deleted from the list) More...
 
Standard_Boolean Remove (const Standard_Integer num)
 Removes an Entity from the Cluster, given its rank. If <num> is greater than NbLocal, calls its Next with (num - NbLocal), Returns True if it becomes itself empty, False else. More...
 
Standard_Integer NbEntities () const
 Returns total count of Entities (including Next) More...
 
const Handle
< Standard_Transient > & 
Value (const Standard_Integer num) const
 Returns the Entity identified by its rank in the list (including Next) More...
 
void SetValue (const Standard_Integer num, const Handle< Standard_Transient > &ent)
 Changes an Entity given its rank. More...
 
void FillIterator (Interface_EntityIterator &iter) const
 Fills an Iterator with designated Entities (includes Next) More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const 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. More...
 
Standard_Boolean IsKind (const Standard_CString 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. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Detailed Description

Auxiliary class for EntityList. An EntityList designates an EntityCluster, which brings itself an fixed maximum count of Entities. If it is full, it gives access to another cluster ("Next"). This class is intended to give a good compromise between access time (faster than a Sequence, good for little count) and memory use (better than a Sequence in any case, overall for little count, better than an Array for a very little count. It is designed for a light management. Remark that a new Item may not be Null, because this is the criterium used for "End of List".

Constructor & Destructor Documentation

Interface_EntityCluster::Interface_EntityCluster ( )

Creates an empty, non-chained, EntityCluster.

Interface_EntityCluster::Interface_EntityCluster ( const Handle< Standard_Transient > &  ent)

Creates a non-chained EntityCluster, filled with one Entity.

Interface_EntityCluster::Interface_EntityCluster ( const Handle< Interface_EntityCluster > &  ec)

Creates an empty EntityCluster, chained with another one (that is, put BEFORE this other one in the list)

Interface_EntityCluster::Interface_EntityCluster ( const Handle< Standard_Transient > &  ant,
const Handle< Interface_EntityCluster > &  ec 
)

Creates an EntityCluster, filled with a first Entity, and chained to another EntityCluster (BEFORE it, as above)

Member Function Documentation

void Interface_EntityCluster::Append ( const Handle< Standard_Transient > &  ent)

Appends an Entity to the Cluster. If it is not full, adds the entity directly inside itself. Else, transmits to its Next and Creates it if it does not yet exist.

void Interface_EntityCluster::FillIterator ( Interface_EntityIterator iter) const

Fills an Iterator with designated Entities (includes Next)

Standard_Integer Interface_EntityCluster::NbEntities ( ) const

Returns total count of Entities (including Next)

Standard_Boolean Interface_EntityCluster::Remove ( const Handle< Standard_Transient > &  ent)

Removes an Entity from the Cluster. If it is not found, calls its Next one to do so. Returns True if it becomes itself empty, False else (thus, a Cluster which becomes empty is deleted from the list)

Standard_Boolean Interface_EntityCluster::Remove ( const Standard_Integer  num)

Removes an Entity from the Cluster, given its rank. If <num> is greater than NbLocal, calls its Next with (num - NbLocal), Returns True if it becomes itself empty, False else.

void Interface_EntityCluster::SetValue ( const Standard_Integer  num,
const Handle< Standard_Transient > &  ent 
)

Changes an Entity given its rank.

const Handle< Standard_Transient >& Interface_EntityCluster::Value ( const Standard_Integer  num) const

Returns the Entity identified by its rank in the list (including Next)


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