![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
This is a relocation dictionary between source and target labels, attributes or any transient(useful for copy or paste actions). Note that one target value may be the relocation value of more than one source object. More...
#include <TDF_RelocationTable.hxx>

Public Member Functions | |
| TDF_RelocationTable (const bool selfRelocate=false) | |
| Creates an relocation table. <selfRelocate> says if a value without explicit relocation is its own relocation. | |
| void | SelfRelocate (const bool selfRelocate) |
| Sets <mySelfRelocate> to <selfRelocate>. | |
| bool | SelfRelocate () const |
| Returns <mySelfRelocate>. | |
| void | AfterRelocate (const bool afterRelocate) |
| bool | AfterRelocate () const |
| Returns <myAfterRelocate>. | |
| void | SetRelocation (const TDF_Label &aSourceLabel, const TDF_Label &aTargetLabel) |
| Sets the relocation value of <aSourceLabel> to <aTargetLabel>. | |
| bool | HasRelocation (const TDF_Label &aSourceLabel, TDF_Label &aTargetLabel) const |
| Finds the relocation value of <aSourceLabel> and returns it into <aTargetLabel>. | |
| void | SetRelocation (const occ::handle< TDF_Attribute > &aSourceAttribute, const occ::handle< TDF_Attribute > &aTargetAttribute) |
| Sets the relocation value of <aSourceAttribute> to <aTargetAttribute>. | |
| bool | HasRelocation (const occ::handle< TDF_Attribute > &aSourceAttribute, occ::handle< TDF_Attribute > &aTargetAttribute) const |
| Finds the relocation value of <aSourceAttribute> and returns it into <aTargetAttribute>. | |
| template<class T > | |
| bool | HasRelocation (const occ::handle< TDF_Attribute > &theSource, occ::handle< T > &theTarget) const |
| Safe variant for arbitrary type of argument. | |
| void | SetTransientRelocation (const occ::handle< Standard_Transient > &aSourceTransient, const occ::handle< Standard_Transient > &aTargetTransient) |
| Sets the relocation value of <aSourceTransient> to <aTargetTransient>. | |
| bool | HasTransientRelocation (const occ::handle< Standard_Transient > &aSourceTransient, occ::handle< Standard_Transient > &aTargetTransient) const |
| Finds the relocation value of <aSourceTransient> and returns it into <aTargetTransient>. | |
| void | Clear () |
| Clears the relocation dictionary, but lets the self relocation flag to its current value. | |
| void | TargetLabelMap (NCollection_Map< TDF_Label > &aLabelMap) const |
| Fills <aLabelMap> with target relocation labels. <aLabelMap> is not cleared before use. | |
| void | TargetAttributeMap (NCollection_Map< occ::handle< TDF_Attribute > > &anAttributeMap) const |
| Fills <anAttributeMap> with target relocation attributes. <anAttributeMap> is not cleared before use. | |
| NCollection_DataMap< TDF_Label, TDF_Label > & | LabelTable () |
| Returns <myLabelTable> to be used or updated. | |
| NCollection_DataMap< occ::handle< TDF_Attribute >, occ::handle< TDF_Attribute > > & | AttributeTable () |
| Returns <myAttributeTable> to be used or updated. | |
| NCollection_IndexedDataMap< occ::handle< Standard_Transient >, occ::handle< Standard_Transient > > & | TransientTable () |
| Returns <myTransientTable> to be used or updated. | |
| Standard_OStream & | Dump (const bool dumpLabels, const bool dumpAttributes, const bool dumpTransients, Standard_OStream &anOS) const |
| Dumps the relocation table. | |
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 is a relocation dictionary between source and target labels, attributes or any transient(useful for copy or paste actions). Note that one target value may be the relocation value of more than one source object.
Common behaviour: it returns true and the found relocation value as target object; false otherwise.
Look at SelfRelocate method for more explanation about self relocation behavior of this class.
Creates an relocation table. <selfRelocate> says if a value without explicit relocation is its own relocation.
| bool TDF_RelocationTable::AfterRelocate | ( | ) | const |
Returns <myAfterRelocate>.
| NCollection_DataMap< occ::handle< TDF_Attribute >, occ::handle< TDF_Attribute > > & TDF_RelocationTable::AttributeTable | ( | ) |
Returns <myAttributeTable> to be used or updated.
| void TDF_RelocationTable::Clear | ( | ) |
Clears the relocation dictionary, but lets the self relocation flag to its current value.
| Standard_OStream & TDF_RelocationTable::Dump | ( | const bool | dumpLabels, |
| const bool | dumpAttributes, | ||
| const bool | dumpTransients, | ||
| Standard_OStream & | anOS ) const |
Dumps the relocation table.
| bool TDF_RelocationTable::HasRelocation | ( | const occ::handle< TDF_Attribute > & | aSourceAttribute, |
| occ::handle< TDF_Attribute > & | aTargetAttribute ) const |
Finds the relocation value of <aSourceAttribute> and returns it into <aTargetAttribute>.
(See above SelfRelocate method for more explanation about the method behavior)
|
inline |
Safe variant for arbitrary type of argument.
| bool TDF_RelocationTable::HasRelocation | ( | const TDF_Label & | aSourceLabel, |
| TDF_Label & | aTargetLabel ) const |
Finds the relocation value of <aSourceLabel> and returns it into <aTargetLabel>.
(See above SelfRelocate method for more explanation about the method behavior)
| bool TDF_RelocationTable::HasTransientRelocation | ( | const occ::handle< Standard_Transient > & | aSourceTransient, |
| occ::handle< Standard_Transient > & | aTargetTransient ) const |
Finds the relocation value of <aSourceTransient> and returns it into <aTargetTransient>.
(See above SelfRelocate method for more explanation about the method behavior)
| NCollection_DataMap< TDF_Label, TDF_Label > & TDF_RelocationTable::LabelTable | ( | ) |
Returns <myLabelTable> to be used or updated.
| bool TDF_RelocationTable::SelfRelocate | ( | ) | const |
Returns <mySelfRelocate>.
Sets <mySelfRelocate> to <selfRelocate>.
This flag affects the HasRelocation method behavior like this:
<mySelfRelocate> == False:
If no relocation object is found in the map, a null object is returned
<mySelfRelocate> == True:
If no relocation object is found in the map, the method assumes the source object is relocation value; so the source object is returned as target object.
| void TDF_RelocationTable::SetRelocation | ( | const occ::handle< TDF_Attribute > & | aSourceAttribute, |
| const occ::handle< TDF_Attribute > & | aTargetAttribute ) |
Sets the relocation value of <aSourceAttribute> to <aTargetAttribute>.
| void TDF_RelocationTable::SetRelocation | ( | const TDF_Label & | aSourceLabel, |
| const TDF_Label & | aTargetLabel ) |
Sets the relocation value of <aSourceLabel> to <aTargetLabel>.
| void TDF_RelocationTable::SetTransientRelocation | ( | const occ::handle< Standard_Transient > & | aSourceTransient, |
| const occ::handle< Standard_Transient > & | aTargetTransient ) |
Sets the relocation value of <aSourceTransient> to <aTargetTransient>.
| void TDF_RelocationTable::TargetAttributeMap | ( | NCollection_Map< occ::handle< TDF_Attribute > > & | anAttributeMap | ) | const |
Fills <anAttributeMap> with target relocation attributes. <anAttributeMap> is not cleared before use.
| void TDF_RelocationTable::TargetLabelMap | ( | NCollection_Map< TDF_Label > & | aLabelMap | ) | const |
Fills <aLabelMap> with target relocation labels. <aLabelMap> is not cleared before use.
| NCollection_IndexedDataMap< occ::handle< Standard_Transient >, occ::handle< Standard_Transient > > & TDF_RelocationTable::TransientTable | ( | ) |
Returns <myTransientTable> to be used or updated.