0022922: Clean up warnings on uninitialized / unused variables
[occt.git] / src / MXCAFDoc / MXCAFDoc_LocationStorageDriver.cxx
1 // File:        MXCAFDoc_LocationStorageDriver.cxx
2 // Created:     Tue Aug 15 15:32:19 2000
3 // Author:      data exchange team
4 //              <det@strelox.nnov.matra-dtv.fr>
5
6
7 #include <MDF_SRelocationTable.hxx>
8 #include <MXCAFDoc_LocationStorageDriver.ixx>
9 #include <MgtTopLoc.hxx>
10 #include <PTColStd_TransientPersistentMap.hxx>
11 #include <PXCAFDoc_Location.hxx>
12 #include <XCAFDoc_Location.hxx>
13
14 //=======================================================================
15 //function : Constructor
16 //purpose  : 
17 //=======================================================================
18
19 MXCAFDoc_LocationStorageDriver::MXCAFDoc_LocationStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver) : MDF_ASDriver (theMsgDriver)
20 {
21 }
22
23 //=======================================================================
24 //function : VersionNumber
25 //purpose  : 
26 //=======================================================================
27
28  Standard_Integer MXCAFDoc_LocationStorageDriver::VersionNumber() const
29 {  return 0; } 
30
31 //=======================================================================
32 //function : SourceType
33 //purpose  : 
34 //=======================================================================
35
36  Handle(Standard_Type) MXCAFDoc_LocationStorageDriver::SourceType() const
37 {
38   static Handle(Standard_Type) sourceType = STANDARD_TYPE(XCAFDoc_Location);
39   return sourceType;
40 }
41
42 //=======================================================================
43 //function : NewEmpty
44 //purpose  : 
45 //=======================================================================
46
47  Handle(PDF_Attribute) MXCAFDoc_LocationStorageDriver::NewEmpty() const
48 {
49   return new PXCAFDoc_Location();
50 }
51
52 //=======================================================================
53 //function : Paste
54 //purpose  : 
55 //=======================================================================
56
57  void MXCAFDoc_LocationStorageDriver::Paste(const Handle(TDF_Attribute)& Source,
58                                                   const Handle(PDF_Attribute)& Target,
59                                                   const Handle(MDF_SRelocationTable)& RelocTable) const
60 {
61   Handle(XCAFDoc_Location) S = Handle(XCAFDoc_Location)::DownCast (Source);
62   Handle(PXCAFDoc_Location) T = Handle(PXCAFDoc_Location)::DownCast (Target);
63   
64   PTColStd_TransientPersistentMap& TPMap = RelocTable->OtherTable();
65   T->Set(MgtTopLoc::Translate(S->Get(), TPMap));
66 }
67