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 | |
7fd59977 |
24 | //======================================================================= |
25 | //function : GetID |
26 | //purpose : |
27 | //======================================================================= |
7fd59977 |
28 | const Standard_GUID& TDataXtd_Placement::GetID () |
29 | { |
30 | static Standard_GUID TDataXtd_PlacementID ("2a96b60b-ec8b-11d0-bee7-080009dc3333"); |
31 | return TDataXtd_PlacementID; |
32 | } |
33 | |
34 | |
35 | //======================================================================= |
36 | //function : Set |
37 | //purpose : |
38 | //======================================================================= |
39 | |
40 | Handle(TDataXtd_Placement) TDataXtd_Placement::Set (const TDF_Label& L) |
41 | { |
42 | Handle (TDataXtd_Placement) A; |
43 | if (!L.FindAttribute (TDataXtd_Placement::GetID (), A)) { |
44 | A = new TDataXtd_Placement (); |
45 | L.AddAttribute(A); |
46 | } |
47 | return A; |
48 | } |
49 | |
50 | |
51 | //======================================================================= |
52 | //function : TDataXtd_Placement |
53 | //purpose : |
54 | //======================================================================= |
55 | |
56 | TDataXtd_Placement::TDataXtd_Placement () { } |
57 | |
58 | |
59 | |
60 | //======================================================================= |
61 | //function : ID |
62 | //purpose : |
63 | //======================================================================= |
64 | |
65 | const Standard_GUID& TDataXtd_Placement::ID () const { return GetID(); } |
66 | |
67 | |
68 | //======================================================================= |
69 | //function : NewEmpty |
70 | //purpose : |
71 | //======================================================================= |
72 | |
73 | Handle(TDF_Attribute) TDataXtd_Placement::NewEmpty() const |
74 | { |
75 | return new TDataXtd_Placement(); |
76 | } |
77 | |
78 | |
79 | //======================================================================= |
80 | //function : Restore |
81 | //purpose : |
82 | //======================================================================= |
83 | |
35e08fe8 |
84 | void TDataXtd_Placement::Restore (const Handle(TDF_Attribute)&) |
7fd59977 |
85 | { |
86 | |
87 | } |
88 | |
89 | //======================================================================= |
90 | //function : Paste |
91 | //purpose : |
92 | //======================================================================= |
93 | |
35e08fe8 |
94 | void TDataXtd_Placement::Paste(const Handle(TDF_Attribute)&, |
95 | const Handle(TDF_RelocationTable)&) const |
7fd59977 |
96 | { |
97 | |
98 | } |
99 | |
7fd59977 |
100 | //======================================================================= |
101 | //function : Dump |
102 | //purpose : |
103 | //======================================================================= |
104 | |
105 | Standard_OStream& TDataXtd_Placement::Dump (Standard_OStream& anOS) const |
106 | { |
107 | anOS << "Placement"; |
108 | return anOS; |
109 | } |