42cf5bc1 |
1 | // Created on: 1997-08-04 |
2 | // Created by: VAUTHIER Jean-Claude |
3 | // Copyright (c) 1997-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _TDF_TagSource_HeaderFile |
18 | #define _TDF_TagSource_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Integer.hxx> |
24 | #include <TDF_Attribute.hxx> |
25 | class Standard_GUID; |
26 | class TDF_Label; |
27 | class TDF_Attribute; |
28 | class TDF_RelocationTable; |
29 | |
30 | |
31 | class TDF_TagSource; |
32 | DEFINE_STANDARD_HANDLE(TDF_TagSource, TDF_Attribute) |
33 | |
34 | //! This attribute manage a tag provider to create |
35 | //! child labels of a given one. |
36 | class TDF_TagSource : public TDF_Attribute |
37 | { |
38 | |
39 | public: |
40 | |
41 | |
42 | //! class methods |
43 | //! ============= |
44 | Standard_EXPORT static const Standard_GUID& GetID(); |
45 | |
46 | //! Find, or create, a TagSource attribute. the TagSource |
47 | //! attribute is returned. |
48 | Standard_EXPORT static Handle(TDF_TagSource) Set (const TDF_Label& label); |
49 | |
50 | //! Find (or create) a tagSource attribute located at <L> |
51 | //! and make a new child label. |
52 | //! TagSource methods |
53 | //! ================= |
54 | Standard_EXPORT static TDF_Label NewChild (const TDF_Label& L); |
55 | |
56 | Standard_EXPORT TDF_TagSource(); |
57 | |
58 | Standard_EXPORT Standard_Integer NewTag(); |
59 | |
60 | Standard_EXPORT TDF_Label NewChild(); |
61 | |
62 | Standard_EXPORT Standard_Integer Get() const; |
63 | |
64 | //! TDF_Attribute methods |
65 | //! ===================== |
66 | Standard_EXPORT void Set (const Standard_Integer T); |
67 | |
79104795 |
68 | Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE; |
42cf5bc1 |
69 | |
79104795 |
70 | Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE; |
42cf5bc1 |
71 | |
79104795 |
72 | Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; |
42cf5bc1 |
73 | |
79104795 |
74 | Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE; |
42cf5bc1 |
75 | |
bc73b006 |
76 | //! Dumps the content of me into the stream |
77 | Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; |
78 | |
42cf5bc1 |
79 | |
80 | |
81 | |
92efcf78 |
82 | DEFINE_STANDARD_RTTIEXT(TDF_TagSource,TDF_Attribute) |
42cf5bc1 |
83 | |
84 | protected: |
85 | |
86 | |
87 | |
88 | |
89 | private: |
90 | |
91 | |
92 | Standard_Integer myTag; |
93 | |
94 | |
95 | }; |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | |
102 | |
103 | #endif // _TDF_TagSource_HeaderFile |