Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Interface_EntityList Class Reference

This class defines a list of Entities (Transient Objects),
it can be used as a field of other Transient classes, with
these features :
More...

#include <Interface_EntityList.hxx>

Public Member Functions

DEFINE_STANDARD_ALLOC Interface_EntityList ()
 Creates a List as beeing empty

void Clear ()
 Clears the List

void Append (const Handle< Standard_Transient > &ent)
 Appends an Entity, that is to the END of the list
(keeps order, but works slowerly than Add, see below)

void Add (const Handle< Standard_Transient > &ent)
 Adds an Entity to the list, that is, with NO REGARD about the
order (faster than Append if count becomes greater than 10)

void Remove (const Handle< Standard_Transient > &ent)
 Removes an Entity from the list, if it is there

void Remove (const Standard_Integer num)
 Removes an Entity from the list, given its rank

Standard_Boolean IsEmpty () const
 Returns True if the list is empty

Standard_Integer NbEntities () const
 Returns count of recorded Entities

const Handle_Standard_TransientValue (const Standard_Integer num) const
 Returns an Item given its number. Beware about the way the
list was filled (see above, Add and Append)

void SetValue (const Standard_Integer num, const Handle< Standard_Transient > &ent)
 Returns an Item given its number. Beware about the way the
list was filled (see above, Add and Append)

void FillIterator (Interface_EntityIterator &iter) const
 fills an Iterator with the content of the list
(normal way to consult a list which has been filled with Add)

Standard_Integer NbTypedEntities (const Handle< Standard_Type > &atype) const
 Returns count of Entities of a given Type (0 : none)

Handle_Standard_Transient TypedEntity (const Handle< Standard_Type > &atype, const Standard_Integer num=0) const
 Returns the Entity which is of a given type.
If num = 0 (D), there must be ONE AND ONLY ONE
If num > 0, returns the num-th entity of this type


Detailed Description

      - oriented to define a little list, that is, slower than an <br>
        Array or a Map of Entities for a big count (about 100 and <br>
        over), but faster than a Sequence <br>
      - allows to work as a Sequence, limited to Clear, Append, <br>
        Remove, Access to an Item identified by its rank in the list <br>
      - space saving, compared to a Sequence, especially for little <br>
        amounts; better than an Array for a very little amount (less <br>
        than 10) but less good for a greater amount <br>


Works in conjunction with EntityCluster
An EntityList gives access to a list of Entity Clusters, which
are chained (in one sense : Single List)
Remark : a new Item may not be Null, because this is the
criterium used for "End of List"


Constructor & Destructor Documentation


Member Function Documentation


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