0025923: Remove small wires on face read from STEP
[occt.git] / src / MDataXtd / MDataXtd_GeometryRetrievalDriver.cxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
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>
23
24
25
26 //=======================================================================
27 //function : MDataXtd_GeometryRetrievalDriver
28 //purpose  : 
29 //=======================================================================
30
31 MDataXtd_GeometryRetrievalDriver::MDataXtd_GeometryRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
32 {
33 }
34
35 //=======================================================================
36 //function : VersionNumber
37 //purpose  : 
38 //=======================================================================
39
40 Standard_Integer MDataXtd_GeometryRetrievalDriver::VersionNumber() const
41 { return 0; }
42
43
44 //=======================================================================
45 //function : SourceType
46 //purpose  : 
47 //=======================================================================
48
49 Handle(Standard_Type) MDataXtd_GeometryRetrievalDriver::SourceType() const
50 { return STANDARD_TYPE(PDataXtd_Geometry);  }
51
52
53
54
55 //=======================================================================
56 //function : NewEmpty
57 //purpose  : 
58 //=======================================================================
59
60 Handle(TDF_Attribute) MDataXtd_GeometryRetrievalDriver::NewEmpty() const
61 { return new TDataXtd_Geometry (); }
62
63
64
65 //=======================================================================
66 //function : Paste
67 //purpose  : 
68 //=======================================================================
69
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
75 {
76   Handle(PDataXtd_Geometry) S = 
77      Handle(PDataXtd_Geometry)::DownCast (Source);
78   Handle(TDataXtd_Geometry) T = 
79     Handle(TDataXtd_Geometry)::DownCast (Target);
80
81   T->SetType (MDataXtd::IntegerToGeometryType (S->GetType ()));
82 }
83
84
85