Open CASCADE Technology 7.8.2.dev
|
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>
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_Transient > & | Value (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) | |
virtual | ~Interface_EntityCluster () |
Destructor If Next exists, destroy from the last entity in reverse order. | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. | |
virtual | ~Standard_Transient () |
Destructor must be virtual. | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. | |
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. | |
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. | |
Standard_Transient * | This () 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. | |
Standard_Integer | GetRefCount () const noexcept |
Get the reference counter of this object. | |
void | IncrementRefCounter () noexcept |
Increments the reference counter of this object. | |
Standard_Integer | DecrementRefCounter () noexcept |
Decrements the reference counter of this object; returns the decremented value. | |
virtual void | Delete () const |
Memory deallocator for transient classes. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
typedef void | base_type |
Returns a type descriptor about this object. | |
Static Public Member Functions inherited from Standard_Transient | |
static constexpr const char * | get_type_name () |
Returns a type descriptor about this object. | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. | |
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".
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)
|
virtual |
Destructor If Next exists, destroy from the last entity in reverse order.
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)