b311480e |
1 | // Created on: 2009-04-06 |
2 | // Created by: Sergey ZARITCHNY |
973c2be1 |
3 | // Copyright (c) 2009-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
42cf5bc1 |
16 | |
17 | #include <Standard_GUID.hxx> |
18 | #include <Standard_Type.hxx> |
19 | #include <TDataXtd_Placement.hxx> |
20 | #include <TDF_Attribute.hxx> |
21 | #include <TDF_Label.hxx> |
22 | #include <TDF_RelocationTable.hxx> |
23 | |
92efcf78 |
24 | IMPLEMENT_STANDARD_RTTIEXT(TDataXtd_Placement,TDF_Attribute) |
25 | |
7fd59977 |
26 | //======================================================================= |
27 | //function : GetID |
28 | //purpose : |
29 | //======================================================================= |
7fd59977 |
30 | const Standard_GUID& TDataXtd_Placement::GetID () |
31 | { |
32 | static Standard_GUID TDataXtd_PlacementID ("2a96b60b-ec8b-11d0-bee7-080009dc3333"); |
33 | return TDataXtd_PlacementID; |
34 | } |
35 | |
36 | |
37 | //======================================================================= |
38 | //function : Set |
39 | //purpose : |
40 | //======================================================================= |
41 | |
42 | Handle(TDataXtd_Placement) TDataXtd_Placement::Set (const TDF_Label& L) |
43 | { |
44 | Handle (TDataXtd_Placement) A; |
45 | if (!L.FindAttribute (TDataXtd_Placement::GetID (), A)) { |
46 | A = new TDataXtd_Placement (); |
47 | L.AddAttribute(A); |
48 | } |
49 | return A; |
50 | } |
51 | |
52 | |
53 | //======================================================================= |
54 | //function : TDataXtd_Placement |
55 | //purpose : |
56 | //======================================================================= |
57 | |
58 | TDataXtd_Placement::TDataXtd_Placement () { } |
59 | |
60 | |
61 | |
62 | //======================================================================= |
63 | //function : ID |
64 | //purpose : |
65 | //======================================================================= |
66 | |
67 | const Standard_GUID& TDataXtd_Placement::ID () const { return GetID(); } |
68 | |
69 | |
70 | //======================================================================= |
71 | //function : NewEmpty |
72 | //purpose : |
73 | //======================================================================= |
74 | |
75 | Handle(TDF_Attribute) TDataXtd_Placement::NewEmpty() const |
76 | { |
77 | return new TDataXtd_Placement(); |
78 | } |
79 | |
80 | |
81 | //======================================================================= |
82 | //function : Restore |
83 | //purpose : |
84 | //======================================================================= |
85 | |
35e08fe8 |
86 | void TDataXtd_Placement::Restore (const Handle(TDF_Attribute)&) |
7fd59977 |
87 | { |
88 | |
89 | } |
90 | |
91 | //======================================================================= |
92 | //function : Paste |
93 | //purpose : |
94 | //======================================================================= |
95 | |
35e08fe8 |
96 | void TDataXtd_Placement::Paste(const Handle(TDF_Attribute)&, |
97 | const Handle(TDF_RelocationTable)&) const |
7fd59977 |
98 | { |
99 | |
100 | } |
101 | |
7fd59977 |
102 | //======================================================================= |
103 | //function : Dump |
104 | //purpose : |
105 | //======================================================================= |
106 | |
107 | Standard_OStream& TDataXtd_Placement::Dump (Standard_OStream& anOS) const |
108 | { |
109 | anOS << "Placement"; |
110 | return anOS; |
111 | } |