Open CASCADE Technology  7.5.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...
 
virtual ~Interface_EntityCluster ()
 Destructor If Next exists, destroy from the last entity in reverse order. 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 void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::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 opencascade::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...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. 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() [1/4]

Interface_EntityCluster::Interface_EntityCluster ( )

Creates an empty, non-chained, EntityCluster.

◆ Interface_EntityCluster() [2/4]

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

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

◆ Interface_EntityCluster() [3/4]

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() [4/4]

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)

◆ ~Interface_EntityCluster()

virtual Interface_EntityCluster::~Interface_EntityCluster ( )
virtual

Destructor If Next exists, destroy from the last entity in reverse order.

Member Function Documentation

◆ Append()

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.

◆ FillIterator()

void Interface_EntityCluster::FillIterator ( Interface_EntityIterator iter) const

Fills an Iterator with designated Entities (includes Next)

◆ NbEntities()

Standard_Integer Interface_EntityCluster::NbEntities ( ) const

Returns total count of Entities (including Next)

◆ Remove() [1/2]

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)

◆ Remove() [2/2]

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.

◆ SetValue()

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

Changes an Entity given its rank.

◆ Value()

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: