![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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 occ::handle< Standard_Transient > &ent) | |
| Creates a non-chained EntityCluster, filled with one Entity. | |
| Interface_EntityCluster (const occ::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 occ::handle< Standard_Transient > &ant, const occ::handle< Interface_EntityCluster > &ec) | |
| Creates an EntityCluster, filled with a first Entity, and chained to another EntityCluster (BEFORE it, as above) | |
| void | Append (const occ::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. | |
| bool | Remove (const occ::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) | |
| bool | Remove (const int 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. | |
| int | NbEntities () const |
| Returns total count of Entities (including Next) | |
| const occ::handle< Standard_Transient > & | Value (const int num) const |
| Returns the Entity identified by its rank in the list (including Next) | |
| void | SetValue (const int num, const occ::handle< Standard_Transient > &ent) |
| Changes an Entity given its rank. | |
| void | FillIterator (Interface_EntityIterator &iter) const |
| Fills an Iterator with designated Entities (includes Next) | |
| ~Interface_EntityCluster () override | |
| 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 ()=default |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| bool | IsInstance (const char *const theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| bool | 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. | |
| bool | IsKind (const char *const 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. | |
| int | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations. | |
| int | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement. | |
| 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 occ::handle< Standard_Transient > & | ent | ) |
Creates a non-chained EntityCluster, filled with one Entity.
| Interface_EntityCluster::Interface_EntityCluster | ( | const occ::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 occ::handle< Standard_Transient > & | ant, |
| const occ::handle< Interface_EntityCluster > & | ec ) |
Creates an EntityCluster, filled with a first Entity, and chained to another EntityCluster (BEFORE it, as above)
|
override |
Destructor If Next exists, destroy from the last entity in reverse order.
| void Interface_EntityCluster::Append | ( | const occ::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)
| int Interface_EntityCluster::NbEntities | ( | ) | const |
Returns total count of Entities (including Next)
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.
| bool Interface_EntityCluster::Remove | ( | const occ::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)
| void Interface_EntityCluster::SetValue | ( | const int | num, |
| const occ::handle< Standard_Transient > & | ent ) |
Changes an Entity given its rank.
| const occ::handle< Standard_Transient > & Interface_EntityCluster::Value | ( | const int | num | ) | const |
Returns the Entity identified by its rank in the list (including Next)