1c657152d403856e51418a9063659fab7b9283c5
[occt.git] / src / MXCAFDoc / MXCAFDoc_AreaStorageDriver.cxx
1 // Created on: 2000-09-08
2 // Created by: data exchange team
3 // Copyright (c) 2000-2012 OPEN CASCADE SAS
4 //
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
9 //
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 //
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
19
20
21
22 #include <MXCAFDoc_AreaStorageDriver.ixx>
23 #include <XCAFDoc_Area.hxx>
24 #include <PXCAFDoc_Area.hxx>
25
26 //=======================================================================
27 //function : MXCAFDoc_AreaStorageDriver
28 //purpose  : 
29 //=======================================================================
30
31 MXCAFDoc_AreaStorageDriver::MXCAFDoc_AreaStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver) : MDF_ASDriver (theMsgDriver)
32 {}
33
34 //=======================================================================
35 //function : VersionNumber
36 //purpose  : 
37 //=======================================================================
38
39 Standard_Integer MXCAFDoc_AreaStorageDriver::VersionNumber() const
40 { return 0; }
41
42 //=======================================================================
43 //function : SourceType
44 //purpose  : 
45 //=======================================================================
46
47  Handle(Standard_Type) MXCAFDoc_AreaStorageDriver::SourceType() const
48 {
49   static Handle(Standard_Type) sourceType = STANDARD_TYPE(XCAFDoc_Area);
50   return sourceType;
51 }
52
53 //=======================================================================
54 //function : NewEmpty
55 //purpose  : 
56 //=======================================================================
57
58  Handle(PDF_Attribute) MXCAFDoc_AreaStorageDriver::NewEmpty() const
59 {
60   return new PXCAFDoc_Area();
61 }
62
63 //=======================================================================
64 //function : Paste
65 //purpose  : 
66 //=======================================================================
67
68  void MXCAFDoc_AreaStorageDriver::Paste(const Handle(TDF_Attribute)& Source,
69                                                   const Handle(PDF_Attribute)& Target,
70                                                   const Handle(MDF_SRelocationTable)& RelocTable) const
71 {
72   Handle(XCAFDoc_Area) S = Handle(XCAFDoc_Area)::DownCast (Source);
73   Handle(PXCAFDoc_Area) T = Handle(PXCAFDoc_Area)::DownCast (Target);
74   
75   T->Set(S->Get());
76 }