Open CASCADE Technology 6.6.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"

#include <Interface_EntityCluster.hxx>

Inheritance diagram for Interface_EntityCluster:
Inheritance graph
[legend]

Public Member Functions

 Interface_EntityCluster ()
 Creates an empty, non-chained, EntityCluster

 Interface_EntityCluster (const Handle< Standard_Transient > &ent)
 Creates a non-chained EntityCluster, filled with one Entity

 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 (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)

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

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)

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

Standard_Integer NbEntities () const
 Returns total count of Entities (including Next)

const Handle_Standard_TransientValue (const Standard_Integer num) const
 Returns the Entity identified by its rank in the list
(including Next)

void SetValue (const Standard_Integer num, const Handle< Standard_Transient > &ent)
 Changes an Entity given its rank.

void FillIterator (Interface_EntityIterator &iter) const
 Fills an Iterator with designated Entities (includes Next)


Constructor & Destructor Documentation

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

Member Function Documentation

void Interface_EntityCluster::Append ( const Handle< Standard_Transient > &  ent)
void Interface_EntityCluster::FillIterator ( Interface_EntityIterator iter) const
Standard_Integer Interface_EntityCluster::NbEntities ( ) const
Standard_Boolean Interface_EntityCluster::Remove ( const Handle< Standard_Transient > &  ent)
Standard_Boolean Interface_EntityCluster::Remove ( const Standard_Integer  num)
void Interface_EntityCluster::SetValue ( const Standard_Integer  num,
const Handle< Standard_Transient > &  ent 
)
const Handle_Standard_Transient& Interface_EntityCluster::Value ( const Standard_Integer  num) const

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines