Open CASCADE Technology  7.0.0
Public Member Functions

TDF_RelocationTable Class Reference

This is a relocation dictionnary 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>

Inheritance diagram for TDF_RelocationTable:
Inheritance graph
[legend]

Public Member Functions

 TDF_RelocationTable (const Standard_Boolean selfRelocate=Standard_False)
 Creates an relocation table. <selfRelocate> says if a value without explicit relocation is its own relocation. More...
 
void SelfRelocate (const Standard_Boolean selfRelocate)
 Sets <mySelfRelocate> to <selfRelocate>. More...
 
Standard_Boolean SelfRelocate () const
 Returns <mySelfRelocate>. More...
 
void AfterRelocate (const Standard_Boolean afterRelocate)
 
Standard_Boolean AfterRelocate () const
 Returns <myAfterRelocate>. More...
 
void SetRelocation (const TDF_Label &aSourceLabel, const TDF_Label &aTargetLabel)
 Sets the relocation value of <aSourceLabel> to <aTargetLabel>. More...
 
Standard_Boolean HasRelocation (const TDF_Label &aSourceLabel, TDF_Label &aTargetLabel) const
 Finds the relocation value of <aSourceLabel> and returns it into <aTargetLabel>. More...
 
void SetRelocation (const Handle< TDF_Attribute > &aSourceAttribute, const Handle< TDF_Attribute > &aTargetAttribute)
 Sets the relocation value of <aSourceAttribute> to <aTargetAttribute>. More...
 
Standard_Boolean HasRelocation (const Handle< TDF_Attribute > &aSourceAttribute, Handle< TDF_Attribute > &aTargetAttribute) const
 Finds the relocation value of <aSourceAttribute> and returns it into <aTargetAttribute>. More...
 
template<class T >
Standard_Boolean HasRelocation (const Handle< TDF_Attribute > &theSource, Handle< T > &theTarget) const
 Safe variant for arbitrary type of argument. More...
 
void SetTransientRelocation (const Handle< Standard_Transient > &aSourceTransient, const Handle< Standard_Transient > &aTargetTransient)
 Sets the relocation value of <aSourceTransient> to <aTargetTransient>. More...
 
Standard_Boolean HasTransientRelocation (const Handle< Standard_Transient > &aSourceTransient, Handle< Standard_Transient > &aTargetTransient) const
 Finds the relocation value of <aSourceTransient> and returns it into <aTargetTransient>. More...
 
void Clear ()
 Clears the relocation dictionnary, but lets the self relocation flag to its current value. More...
 
void TargetLabelMap (TDF_LabelMap &aLabelMap) const
 Fills <aLabelMap> with target relocation labels. <aLabelMap> is not cleared before use. More...
 
void TargetAttributeMap (TDF_AttributeMap &anAttributeMap) const
 Fills <anAttributeMap> with target relocation attributes. <anAttributeMap> is not cleared before use. More...
 
TDF_LabelDataMapLabelTable ()
 Returns <myLabelTable> to be used or updated. More...
 
TDF_AttributeDataMapAttributeTable ()
 Returns <myAttributeTable> to be used or updated. More...
 
TColStd_IndexedDataMapOfTransientTransientTransientTable ()
 Returns <myTransientTable> to be used or updated. More...
 
Standard_OStreamDump (const Standard_Boolean dumpLabels, const Standard_Boolean dumpAttributes, const Standard_Boolean dumpTransients, Standard_OStream &anOS) const
 Dumps the relocation table. More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const override
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
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. More...
 
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. More...
 
Standard_TransientThis () 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. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

This is a relocation dictionnary 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.

Constructor & Destructor Documentation

TDF_RelocationTable::TDF_RelocationTable ( const Standard_Boolean  selfRelocate = Standard_False)

Creates an relocation table. <selfRelocate> says if a value without explicit relocation is its own relocation.

Member Function Documentation

void TDF_RelocationTable::AfterRelocate ( const Standard_Boolean  afterRelocate)
Standard_Boolean TDF_RelocationTable::AfterRelocate ( ) const

Returns <myAfterRelocate>.

TDF_AttributeDataMap& TDF_RelocationTable::AttributeTable ( )

Returns <myAttributeTable> to be used or updated.

void TDF_RelocationTable::Clear ( )

Clears the relocation dictionnary, but lets the self relocation flag to its current value.

Standard_OStream& TDF_RelocationTable::Dump ( const Standard_Boolean  dumpLabels,
const Standard_Boolean  dumpAttributes,
const Standard_Boolean  dumpTransients,
Standard_OStream anOS 
) const

Dumps the relocation table.

Standard_Boolean 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)

Standard_Boolean TDF_RelocationTable::HasRelocation ( const Handle< TDF_Attribute > &  aSourceAttribute,
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)

template<class T >
Standard_Boolean TDF_RelocationTable::HasRelocation ( const Handle< TDF_Attribute > &  theSource,
Handle< T > &  theTarget 
) const
inline

Safe variant for arbitrary type of argument.

Standard_Boolean TDF_RelocationTable::HasTransientRelocation ( const Handle< Standard_Transient > &  aSourceTransient,
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)

TDF_LabelDataMap& TDF_RelocationTable::LabelTable ( )

Returns <myLabelTable> to be used or updated.

void TDF_RelocationTable::SelfRelocate ( const Standard_Boolean  selfRelocate)

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.

Standard_Boolean TDF_RelocationTable::SelfRelocate ( ) const

Returns <mySelfRelocate>.

void TDF_RelocationTable::SetRelocation ( const TDF_Label aSourceLabel,
const TDF_Label aTargetLabel 
)

Sets the relocation value of <aSourceLabel> to <aTargetLabel>.

void TDF_RelocationTable::SetRelocation ( const Handle< TDF_Attribute > &  aSourceAttribute,
const Handle< TDF_Attribute > &  aTargetAttribute 
)

Sets the relocation value of <aSourceAttribute> to <aTargetAttribute>.

void TDF_RelocationTable::SetTransientRelocation ( const Handle< Standard_Transient > &  aSourceTransient,
const Handle< Standard_Transient > &  aTargetTransient 
)

Sets the relocation value of <aSourceTransient> to <aTargetTransient>.

void TDF_RelocationTable::TargetAttributeMap ( TDF_AttributeMap anAttributeMap) const

Fills <anAttributeMap> with target relocation attributes. <anAttributeMap> is not cleared before use.

void TDF_RelocationTable::TargetLabelMap ( TDF_LabelMap aLabelMap) const

Fills <aLabelMap> with target relocation labels. <aLabelMap> is not cleared before use.

TColStd_IndexedDataMapOfTransientTransient& TDF_RelocationTable::TransientTable ( )

Returns <myTransientTable> to be used or updated.


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