0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / MXCAFDoc / MXCAFDoc_VolumeRetrievalDriver.cxx
1 // File:        MXCAFDoc_VolumeRetrievalDriver.cxx
2 // Created:     Fri Sep  8 18:31:04 2000
3 // Author:      data exchange team
4 //              <det@nordox.nnov.matra-dtv.fr>
5
6
7 #include <MXCAFDoc_VolumeRetrievalDriver.ixx>
8 #include <PXCAFDoc_Volume.hxx>
9 #include <XCAFDoc_Volume.hxx>
10
11 //=======================================================================
12 //function : MCAFDoc_VolumeRetrievalDriver
13 //purpose  : 
14 //=======================================================================
15
16 MXCAFDoc_VolumeRetrievalDriver::MXCAFDoc_VolumeRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver) : MDF_ARDriver (theMsgDriver)
17 {}
18
19 //=======================================================================
20 //function : VersionNumber
21 //purpose  : 
22 //=======================================================================
23
24 Standard_Integer MXCAFDoc_VolumeRetrievalDriver::VersionNumber() const
25 { return 0; }
26
27 //=======================================================================
28 //function : SourceType
29 //purpose  : 
30 //=======================================================================
31
32  Handle(Standard_Type) MXCAFDoc_VolumeRetrievalDriver::SourceType() const
33 {
34   static Handle(Standard_Type) sourceType = STANDARD_TYPE(PXCAFDoc_Volume);
35   return sourceType;
36 }
37 //=======================================================================
38 //function : NewEmpty
39 //purpose  : 
40 //=======================================================================
41
42  Handle(TDF_Attribute) MXCAFDoc_VolumeRetrievalDriver::NewEmpty() const
43 {
44   return new XCAFDoc_Volume();
45 }
46
47 //=======================================================================
48 //function : Paste
49 //purpose  : 
50 //=======================================================================
51
52  void MXCAFDoc_VolumeRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
53                                                     const Handle(TDF_Attribute)& Target,
54                                                     const Handle(MDF_RRelocationTable)& RelocTable) const
55 {
56   Handle(PXCAFDoc_Volume) S = Handle(PXCAFDoc_Volume)::DownCast (Source);
57   Handle(XCAFDoc_Volume) T = Handle(XCAFDoc_Volume)::DownCast (Target);
58   
59   T->Set(S->Get());
60 }