File indexing completed on 2026-10-04 09:16:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _TDF_Tool_HeaderFile
0017 #define _TDF_Tool_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022
0023 #include <Standard_Integer.hxx>
0024 #include <TDF_Attribute.hxx>
0025 #include <NCollection_Map.hxx>
0026 #include <NCollection_List.hxx>
0027 #include <Standard_CString.hxx>
0028 #include <TDF_Label.hxx>
0029 #include <NCollection_DataMap.hxx>
0030 #include <Standard_OStream.hxx>
0031 class TDF_Label;
0032 class TDF_IDFilter;
0033 class TCollection_AsciiString;
0034 class TDF_Data;
0035
0036
0037 class TDF_Tool
0038 {
0039 public:
0040 DEFINE_STANDARD_ALLOC
0041
0042
0043
0044
0045 Standard_EXPORT static int NbLabels(const TDF_Label& aLabel);
0046
0047
0048
0049
0050
0051 Standard_EXPORT static int NbAttributes(const TDF_Label& aLabel);
0052
0053
0054
0055
0056 Standard_EXPORT static int NbAttributes(const TDF_Label& aLabel, const TDF_IDFilter& aFilter);
0057
0058
0059
0060
0061 Standard_EXPORT static bool IsSelfContained(const TDF_Label& aLabel);
0062
0063
0064
0065
0066 Standard_EXPORT static bool IsSelfContained(const TDF_Label& aLabel, const TDF_IDFilter& aFilter);
0067
0068
0069
0070
0071
0072 Standard_EXPORT static void OutReferers(const TDF_Label& theLabel,
0073 NCollection_Map<occ::handle<TDF_Attribute>>& theAtts);
0074
0075
0076
0077
0078
0079 Standard_EXPORT static void OutReferers(const TDF_Label& aLabel,
0080 const TDF_IDFilter& aFilterForReferers,
0081 const TDF_IDFilter& aFilterForReferences,
0082 NCollection_Map<occ::handle<TDF_Attribute>>& atts);
0083
0084
0085
0086 Standard_EXPORT static void OutReferences(const TDF_Label& aLabel,
0087 NCollection_Map<occ::handle<TDF_Attribute>>& atts);
0088
0089
0090
0091
0092 Standard_EXPORT static void OutReferences(const TDF_Label& aLabel,
0093 const TDF_IDFilter& aFilterForReferers,
0094 const TDF_IDFilter& aFilterForReferences,
0095 NCollection_Map<occ::handle<TDF_Attribute>>& atts);
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107 Standard_EXPORT static void RelocateLabel(const TDF_Label& aSourceLabel,
0108 const TDF_Label& fromRoot,
0109 const TDF_Label& toRoot,
0110 TDF_Label& aTargetLabel,
0111 const bool create = false);
0112
0113
0114
0115
0116 Standard_EXPORT static void Entry(const TDF_Label& aLabel, TCollection_AsciiString& anEntry);
0117
0118
0119
0120 Standard_EXPORT static void TagList(const TDF_Label& aLabel, NCollection_List<int>& aTagList);
0121
0122
0123
0124 Standard_EXPORT static void TagList(const TCollection_AsciiString& anEntry,
0125 NCollection_List<int>& aTagList);
0126
0127
0128
0129
0130 Standard_EXPORT static void Label(const occ::handle<TDF_Data>& aDF,
0131 const TCollection_AsciiString& anEntry,
0132 TDF_Label& aLabel,
0133 const bool create = false);
0134
0135
0136
0137
0138 Standard_EXPORT static void Label(const occ::handle<TDF_Data>& aDF,
0139 const char* const anEntry,
0140 TDF_Label& aLabel,
0141 const bool create = false);
0142
0143
0144
0145
0146 Standard_EXPORT static void Label(const occ::handle<TDF_Data>& aDF,
0147 const NCollection_List<int>& aTagList,
0148 TDF_Label& aLabel,
0149 const bool create = false);
0150
0151
0152
0153
0154
0155 Standard_EXPORT static void CountLabels(NCollection_List<TDF_Label>& aLabelList,
0156 NCollection_DataMap<TDF_Label, int>& aLabelMap);
0157
0158
0159
0160
0161
0162 Standard_EXPORT static void DeductLabels(NCollection_List<TDF_Label>& aLabelList,
0163 NCollection_DataMap<TDF_Label, int>& aLabelMap);
0164
0165
0166 Standard_EXPORT static void DeepDump(Standard_OStream& anOS, const occ::handle<TDF_Data>& aDF);
0167
0168
0169
0170
0171 Standard_EXPORT static void ExtendedDeepDump(Standard_OStream& anOS,
0172 const occ::handle<TDF_Data>& aDF,
0173 const TDF_IDFilter& aFilter);
0174
0175
0176 Standard_EXPORT static void DeepDump(Standard_OStream& anOS, const TDF_Label& aLabel);
0177
0178
0179
0180
0181 Standard_EXPORT static void ExtendedDeepDump(Standard_OStream& anOS,
0182 const TDF_Label& aLabel,
0183 const TDF_IDFilter& aFilter);
0184 };
0185
0186 #endif