1 // File: XCAFDoc_Location.cxx
2 // Created: Tue Aug 15 11:14:56 2000
3 // Author: data exchange team
4 // <det@strelox.nnov.matra-dtv.fr>
7 #include <XCAFDoc_Location.ixx>
9 //=======================================================================
10 //function : Constructor
12 //=======================================================================
14 XCAFDoc_Location::XCAFDoc_Location()
18 //=======================================================================
21 //=======================================================================
23 const Standard_GUID& XCAFDoc_Location::GetID()
25 static Standard_GUID LocationID ("efd212ef-6dfd-11d4-b9c8-0060b0ee281b");
29 //=======================================================================
32 //=======================================================================
34 Handle(XCAFDoc_Location) XCAFDoc_Location::Set(const TDF_Label& L,const TopLoc_Location& Loc)
36 Handle(XCAFDoc_Location) A;
37 if (!L.FindAttribute (XCAFDoc_Location::GetID(), A)) {
38 A = new XCAFDoc_Location ();
45 //=======================================================================
48 //=======================================================================
50 void XCAFDoc_Location::Set(const TopLoc_Location& Loc)
56 //=======================================================================
59 //=======================================================================
61 TopLoc_Location XCAFDoc_Location::Get() const
66 //=======================================================================
69 //=======================================================================
71 const Standard_GUID& XCAFDoc_Location::ID() const
76 //=======================================================================
79 //=======================================================================
81 void XCAFDoc_Location::Restore(const Handle(TDF_Attribute)& With)
83 myLocation = Handle(XCAFDoc_Location)::DownCast(With)->Get();
86 //=======================================================================
89 //=======================================================================
91 Handle(TDF_Attribute) XCAFDoc_Location::NewEmpty() const
93 return new XCAFDoc_Location();
96 //=======================================================================
99 //=======================================================================
101 void XCAFDoc_Location::Paste(const Handle(TDF_Attribute)& Into,const Handle(TDF_RelocationTable)& /* RT */) const
103 Handle(XCAFDoc_Location)::DownCast(Into)->Set(myLocation);