![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
This class allows to memorize and access to the modifiers which are to be applied to a file. To each modifier, is bound a list of integers (optional) : if this list is absent, the modifier applies to all the file. Else, it applies to the entities designated by these numbers in the produced file. More...
#include <IFSelect_AppliedModifiers.hxx>

Public Member Functions | |
| IFSelect_AppliedModifiers (const int nbmax, const int nbent) | |
| Creates an AppliedModifiers, ready to record up to <nbmax> modifiers, on a model of <nbent> entities. | |
| bool | AddModif (const occ::handle< IFSelect_GeneralModifier > &modif) |
| Records a modifier. By default, it is to apply on all a produced file. Further calls to AddNum will restrict this. Returns True if done, False if too many modifiers are already recorded. | |
| bool | AddNum (const int nument) |
| Adds a number of entity of the output file to be applied on. If a sequence of AddNum is called after AddModif, this Modifier will be applied on the list of designated entities. Else, it will be applied on all the file Returns True if done, False if no modifier has yet been added. | |
| int | Count () const |
| Returns the count of recorded modifiers. | |
| bool | Item (const int num, occ::handle< IFSelect_GeneralModifier > &modif, int &entcount) |
| Returns the description for applied modifier n0 <num> : the modifier itself, and the count of entities to be applied on. If no specific list of number has been defined, returns the total count of entities of the file If this count is zero, then the modifier applies to all the file (see below). Else, the numbers are then queried by calls to ItemNum between 1 and <entcount> Returns True if OK, False if <num> is out of range. | |
| int | ItemNum (const int nument) const |
| Returns a numero of entity to be applied on, given its rank in the list. If no list is defined (i.e. for all the file), returns <nument> itself, to give all the entities of the file Returns 0 if <nument> out of range. | |
| occ::handle< NCollection_HSequence< int > > | ItemList () const |
| Returns the list of entities to be applied on (see Item) as a HSequence (IsForAll produces the complete list of all the entity numbers of the file. | |
| bool | IsForAll () const |
| Returns True if the applied modifier queried by last call to Item is to be applied to all the produced file. Else, <entcount> returned by Item gives the count of entity numbers, each one is queried by ItemNum. | |
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. | |
This class allows to memorize and access to the modifiers which are to be applied to a file. To each modifier, is bound a list of integers (optional) : if this list is absent, the modifier applies to all the file. Else, it applies to the entities designated by these numbers in the produced file.
To record a modifier, and a possible list of entity numbers to be applied on: AddModif (amodifier); loop on AddNum (anumber);
To query it, Count gives the count of recorded modifiers, then for each one: Item (numodif, amodifier, entcount); IsForAll () -> can be called, if True, applies on the whole file
for (i = 1; i <= entcount; i ++) nument = ItemNum (i); -> return an entity number
Creates an AppliedModifiers, ready to record up to <nbmax> modifiers, on a model of <nbent> entities.
| bool IFSelect_AppliedModifiers::AddModif | ( | const occ::handle< IFSelect_GeneralModifier > & | modif | ) |
Records a modifier. By default, it is to apply on all a produced file. Further calls to AddNum will restrict this. Returns True if done, False if too many modifiers are already recorded.
Adds a number of entity of the output file to be applied on. If a sequence of AddNum is called after AddModif, this Modifier will be applied on the list of designated entities. Else, it will be applied on all the file Returns True if done, False if no modifier has yet been added.
| int IFSelect_AppliedModifiers::Count | ( | ) | const |
Returns the count of recorded modifiers.
| bool IFSelect_AppliedModifiers::IsForAll | ( | ) | const |
Returns True if the applied modifier queried by last call to Item is to be applied to all the produced file. Else, <entcount> returned by Item gives the count of entity numbers, each one is queried by ItemNum.
| bool IFSelect_AppliedModifiers::Item | ( | const int | num, |
| occ::handle< IFSelect_GeneralModifier > & | modif, | ||
| int & | entcount ) |
Returns the description for applied modifier n0 <num> : the modifier itself, and the count of entities to be applied on. If no specific list of number has been defined, returns the total count of entities of the file If this count is zero, then the modifier applies to all the file (see below). Else, the numbers are then queried by calls to ItemNum between 1 and <entcount> Returns True if OK, False if <num> is out of range.
| occ::handle< NCollection_HSequence< int > > IFSelect_AppliedModifiers::ItemList | ( | ) | const |
Returns the list of entities to be applied on (see Item) as a HSequence (IsForAll produces the complete list of all the entity numbers of the file.
Returns a numero of entity to be applied on, given its rank in the list. If no list is defined (i.e. for all the file), returns <nument> itself, to give all the entities of the file Returns 0 if <nument> out of range.