File indexing completed on 2025-01-18 10:05:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _TDF_RelocationTable_HeaderFile
0017 #define _TDF_RelocationTable_HeaderFile
0018
0019 #include <Standard.hxx>
0020
0021 #include <TDF_LabelDataMap.hxx>
0022 #include <TDF_AttributeDataMap.hxx>
0023 #include <TColStd_IndexedDataMapOfTransientTransient.hxx>
0024 #include <Standard_Transient.hxx>
0025 #include <TDF_LabelMap.hxx>
0026 #include <TDF_AttributeMap.hxx>
0027 #include <Standard_OStream.hxx>
0028 class TDF_Label;
0029 class TDF_Attribute;
0030
0031
0032 class TDF_RelocationTable;
0033 DEFINE_STANDARD_HANDLE(TDF_RelocationTable, Standard_Transient)
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 class TDF_RelocationTable : public Standard_Transient
0048 {
0049
0050 public:
0051
0052
0053
0054
0055
0056 Standard_EXPORT TDF_RelocationTable(const Standard_Boolean selfRelocate = Standard_False);
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074 Standard_EXPORT void SelfRelocate (const Standard_Boolean selfRelocate);
0075
0076
0077 Standard_EXPORT Standard_Boolean SelfRelocate() const;
0078
0079 Standard_EXPORT void AfterRelocate (const Standard_Boolean afterRelocate);
0080
0081
0082 Standard_EXPORT Standard_Boolean AfterRelocate() const;
0083
0084
0085
0086 Standard_EXPORT void SetRelocation (const TDF_Label& aSourceLabel, const TDF_Label& aTargetLabel);
0087
0088
0089
0090
0091
0092
0093 Standard_EXPORT Standard_Boolean HasRelocation (const TDF_Label& aSourceLabel, TDF_Label& aTargetLabel) const;
0094
0095
0096
0097 Standard_EXPORT void SetRelocation (const Handle(TDF_Attribute)& aSourceAttribute, const Handle(TDF_Attribute)& aTargetAttribute);
0098
0099
0100
0101
0102
0103
0104 Standard_EXPORT Standard_Boolean HasRelocation (const Handle(TDF_Attribute)& aSourceAttribute, Handle(TDF_Attribute)& aTargetAttribute) const;
0105
0106
0107 template <class T>
0108 Standard_Boolean HasRelocation (const Handle(TDF_Attribute)& theSource, Handle(T)& theTarget) const
0109 {
0110 Handle(TDF_Attribute) anAttr = theTarget;
0111 return HasRelocation (theSource, anAttr) && ! (theTarget = Handle(T)::DownCast(anAttr)).IsNull();
0112 }
0113
0114
0115
0116 Standard_EXPORT void SetTransientRelocation (const Handle(Standard_Transient)& aSourceTransient, const Handle(Standard_Transient)& aTargetTransient);
0117
0118
0119
0120
0121
0122
0123 Standard_EXPORT Standard_Boolean HasTransientRelocation (const Handle(Standard_Transient)& aSourceTransient, Handle(Standard_Transient)& aTargetTransient) const;
0124
0125
0126
0127 Standard_EXPORT void Clear();
0128
0129
0130
0131 Standard_EXPORT void TargetLabelMap (TDF_LabelMap& aLabelMap) const;
0132
0133
0134
0135
0136 Standard_EXPORT void TargetAttributeMap (TDF_AttributeMap& anAttributeMap) const;
0137
0138
0139 Standard_EXPORT TDF_LabelDataMap& LabelTable();
0140
0141
0142 Standard_EXPORT TDF_AttributeDataMap& AttributeTable();
0143
0144
0145 Standard_EXPORT TColStd_IndexedDataMapOfTransientTransient& TransientTable();
0146
0147
0148 Standard_EXPORT Standard_OStream& Dump (const Standard_Boolean dumpLabels, const Standard_Boolean dumpAttributes, const Standard_Boolean dumpTransients, Standard_OStream& anOS) const;
0149
0150
0151
0152
0153 DEFINE_STANDARD_RTTIEXT(TDF_RelocationTable,Standard_Transient)
0154
0155 protected:
0156
0157
0158
0159
0160 private:
0161
0162
0163 Standard_Boolean mySelfRelocate;
0164 Standard_Boolean myAfterRelocate;
0165 TDF_LabelDataMap myLabelTable;
0166 TDF_AttributeDataMap myAttributeTable;
0167 TColStd_IndexedDataMapOfTransientTransient myTransientTable;
0168
0169
0170 };
0171
0172
0173
0174
0175
0176
0177
0178 #endif