7fd59977 |
1 | // File: MDataXtd_GeometryRetrievalDriver.cxx |
2 | // Created: Wed Nov 19 15:59:14 1997 |
3 | // Author: Denis PASCAL |
4 | // <dp@dingox.paris1.matra-dtv.fr> |
5 | |
6 | |
7 | #include <MDataXtd_GeometryRetrievalDriver.ixx> |
8 | #include <TDataXtd_GeometryEnum.hxx> |
9 | #include <TDataXtd_Geometry.hxx> |
10 | #include <PDataXtd_Geometry.hxx> |
11 | #include <MDataXtd.hxx> |
12 | #include <CDM_MessageDriver.hxx> |
13 | |
14 | |
15 | |
16 | //======================================================================= |
17 | //function : MDataXtd_GeometryRetrievalDriver |
18 | //purpose : |
19 | //======================================================================= |
20 | |
21 | MDataXtd_GeometryRetrievalDriver::MDataXtd_GeometryRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver) |
22 | { |
23 | } |
24 | |
25 | //======================================================================= |
26 | //function : VersionNumber |
27 | //purpose : |
28 | //======================================================================= |
29 | |
30 | Standard_Integer MDataXtd_GeometryRetrievalDriver::VersionNumber() const |
31 | { return 0; } |
32 | |
33 | |
34 | //======================================================================= |
35 | //function : SourceType |
36 | //purpose : |
37 | //======================================================================= |
38 | |
39 | Handle(Standard_Type) MDataXtd_GeometryRetrievalDriver::SourceType() const |
40 | { return STANDARD_TYPE(PDataXtd_Geometry); } |
41 | |
42 | |
43 | |
44 | |
45 | //======================================================================= |
46 | //function : NewEmpty |
47 | //purpose : |
48 | //======================================================================= |
49 | |
50 | Handle(TDF_Attribute) MDataXtd_GeometryRetrievalDriver::NewEmpty() const |
51 | { return new TDataXtd_Geometry (); } |
52 | |
53 | |
54 | |
55 | //======================================================================= |
56 | //function : Paste |
57 | //purpose : |
58 | //======================================================================= |
59 | |
60 | void MDataXtd_GeometryRetrievalDriver::Paste ( |
61 | const Handle(PDF_Attribute)& Source, |
62 | const Handle(TDF_Attribute)& Target, |
63 | // const Handle(MDF_RRelocationTable)& RelocTable) const |
64 | const Handle(MDF_RRelocationTable)& ) const |
65 | { |
66 | Handle(PDataXtd_Geometry) S = |
67 | Handle(PDataXtd_Geometry)::DownCast (Source); |
68 | Handle(TDataXtd_Geometry) T = |
69 | Handle(TDataXtd_Geometry)::DownCast (Target); |
70 | |
71 | T->SetType (MDataXtd::IntegerToGeometryType (S->GetType ())); |
72 | } |
73 | |
74 | |
75 | |