File indexing completed on 2025-01-18 10:05:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _TDataStd_TreeNode_HeaderFile
0018 #define _TDataStd_TreeNode_HeaderFile
0019
0020 #include <Standard.hxx>
0021
0022 #include <TDataStd_PtrTreeNode.hxx>
0023 #include <Standard_GUID.hxx>
0024 #include <TDF_Attribute.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Standard_OStream.hxx>
0027 class TDF_Label;
0028 class TDF_AttributeDelta;
0029 class TDF_RelocationTable;
0030 class TDF_DataSet;
0031
0032
0033 class TDataStd_TreeNode;
0034 DEFINE_STANDARD_HANDLE(TDataStd_TreeNode, TDF_Attribute)
0035
0036
0037
0038
0039
0040
0041
0042
0043 class TDataStd_TreeNode : public TDF_Attribute
0044 {
0045
0046 public:
0047
0048
0049
0050
0051
0052
0053 Standard_EXPORT static Standard_Boolean Find (const TDF_Label& L, Handle(TDataStd_TreeNode)& T);
0054
0055
0056
0057
0058
0059 Standard_EXPORT static Handle(TDataStd_TreeNode) Set (const TDF_Label& L);
0060
0061
0062
0063
0064
0065 Standard_EXPORT static Handle(TDataStd_TreeNode) Set (const TDF_Label& L, const Standard_GUID& ExplicitTreeID);
0066
0067
0068
0069
0070
0071 Standard_EXPORT static const Standard_GUID& GetDefaultTreeID();
0072
0073 Standard_EXPORT TDataStd_TreeNode();
0074
0075
0076
0077 Standard_EXPORT Standard_Boolean Append (const Handle(TDataStd_TreeNode)& Child);
0078
0079
0080
0081 Standard_EXPORT Standard_Boolean Prepend (const Handle(TDataStd_TreeNode)& Child);
0082
0083
0084
0085 Standard_EXPORT Standard_Boolean InsertBefore (const Handle(TDataStd_TreeNode)& Node);
0086
0087
0088
0089 Standard_EXPORT Standard_Boolean InsertAfter (const Handle(TDataStd_TreeNode)& Node);
0090
0091
0092
0093 Standard_EXPORT Standard_Boolean Remove();
0094
0095
0096
0097 Standard_EXPORT Standard_Integer Depth() const;
0098
0099
0100
0101
0102 Standard_EXPORT Standard_Integer NbChildren (const Standard_Boolean allLevels = Standard_False) const;
0103
0104
0105
0106
0107 Standard_EXPORT Standard_Boolean IsAscendant (const Handle(TDataStd_TreeNode)& of) const;
0108
0109
0110
0111
0112 Standard_EXPORT Standard_Boolean IsDescendant (const Handle(TDataStd_TreeNode)& of) const;
0113
0114
0115
0116 Standard_EXPORT Standard_Boolean IsRoot() const;
0117
0118
0119 Standard_EXPORT Handle(TDataStd_TreeNode) Root() const;
0120
0121
0122 Standard_EXPORT Standard_Boolean IsFather (const Handle(TDataStd_TreeNode)& of) const;
0123
0124
0125 Standard_EXPORT Standard_Boolean IsChild (const Handle(TDataStd_TreeNode)& of) const;
0126
0127
0128 Standard_Boolean HasFather() const;
0129
0130
0131 Standard_EXPORT Handle(TDataStd_TreeNode) Father() const;
0132
0133
0134 Standard_Boolean HasNext() const;
0135
0136
0137
0138
0139
0140 Standard_EXPORT Handle(TDataStd_TreeNode) Next() const;
0141
0142
0143 Standard_Boolean HasPrevious() const;
0144
0145
0146
0147
0148 Standard_EXPORT Handle(TDataStd_TreeNode) Previous() const;
0149
0150
0151 Standard_Boolean HasFirst() const;
0152
0153
0154 Standard_EXPORT Handle(TDataStd_TreeNode) First() const;
0155
0156
0157 Standard_Boolean HasLast() const;
0158
0159
0160 Standard_EXPORT Handle(TDataStd_TreeNode) Last();
0161
0162
0163
0164
0165 Standard_EXPORT Handle(TDataStd_TreeNode) FindLast();
0166
0167 Standard_EXPORT void SetTreeID (const Standard_GUID& explicitID);
0168
0169 Standard_EXPORT void SetFather (const Handle(TDataStd_TreeNode)& F);
0170
0171 Standard_EXPORT void SetNext (const Handle(TDataStd_TreeNode)& F);
0172
0173 Standard_EXPORT void SetPrevious (const Handle(TDataStd_TreeNode)& F);
0174
0175 Standard_EXPORT void SetFirst (const Handle(TDataStd_TreeNode)& F);
0176
0177
0178
0179 Standard_EXPORT void SetLast (const Handle(TDataStd_TreeNode)& F);
0180
0181
0182 Standard_EXPORT virtual void AfterAddition() Standard_OVERRIDE;
0183
0184
0185 Standard_EXPORT virtual void BeforeForget() Standard_OVERRIDE;
0186
0187
0188 Standard_EXPORT virtual void AfterResume() Standard_OVERRIDE;
0189
0190
0191 Standard_EXPORT virtual Standard_Boolean BeforeUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
0192
0193
0194
0195
0196 Standard_EXPORT virtual Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
0197
0198
0199 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0200
0201 Standard_EXPORT virtual void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
0202
0203 Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
0204
0205 Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0206
0207 Standard_EXPORT virtual void References (const Handle(TDF_DataSet)& aDataSet) const Standard_OVERRIDE;
0208
0209 Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
0210
0211
0212 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0213
0214
0215 friend class TDataStd_ChildNodeIterator;
0216
0217
0218 DEFINE_STANDARD_RTTIEXT(TDataStd_TreeNode,TDF_Attribute)
0219
0220 protected:
0221
0222
0223
0224
0225 private:
0226
0227
0228 TDataStd_PtrTreeNode myFather;
0229 TDataStd_PtrTreeNode myPrevious;
0230 TDataStd_PtrTreeNode myNext;
0231 TDataStd_PtrTreeNode myFirst;
0232 TDataStd_PtrTreeNode myLast;
0233 Standard_GUID myTreeID;
0234
0235
0236 };
0237
0238
0239 #include <TDataStd_TreeNode.lxx>
0240
0241
0242
0243
0244
0245 #endif