1 // Created on: 1997-11-19
2 // Created by: Denis PASCAL
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <MDataXtd_GeometryRetrievalDriver.ixx>
18 #include <TDataXtd_GeometryEnum.hxx>
19 #include <TDataXtd_Geometry.hxx>
20 #include <PDataXtd_Geometry.hxx>
21 #include <MDataXtd.hxx>
22 #include <CDM_MessageDriver.hxx>
26 //=======================================================================
27 //function : MDataXtd_GeometryRetrievalDriver
29 //=======================================================================
31 MDataXtd_GeometryRetrievalDriver::MDataXtd_GeometryRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
35 //=======================================================================
36 //function : VersionNumber
38 //=======================================================================
40 Standard_Integer MDataXtd_GeometryRetrievalDriver::VersionNumber() const
44 //=======================================================================
45 //function : SourceType
47 //=======================================================================
49 Handle(Standard_Type) MDataXtd_GeometryRetrievalDriver::SourceType() const
50 { return STANDARD_TYPE(PDataXtd_Geometry); }
55 //=======================================================================
58 //=======================================================================
60 Handle(TDF_Attribute) MDataXtd_GeometryRetrievalDriver::NewEmpty() const
61 { return new TDataXtd_Geometry (); }
65 //=======================================================================
68 //=======================================================================
70 void MDataXtd_GeometryRetrievalDriver::Paste (
71 const Handle(PDF_Attribute)& Source,
72 const Handle(TDF_Attribute)& Target,
73 // const Handle(MDF_RRelocationTable)& RelocTable) const
74 const Handle(MDF_RRelocationTable)& ) const
76 Handle(PDataXtd_Geometry) S =
77 Handle(PDataXtd_Geometry)::DownCast (Source);
78 Handle(TDataXtd_Geometry) T =
79 Handle(TDataXtd_Geometry)::DownCast (Target);
81 T->SetType (MDataXtd::IntegerToGeometryType (S->GetType ()));