0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / XmlMDataXtd / XmlMDataXtd.cxx
1 // Created on: 2001-08-27
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <XmlMDataXtd.hxx>
17
18 #include <Message_Messenger.hxx>
19 #include <XmlMDataXtd_ConstraintDriver.hxx>
20 #include <XmlMDataXtd_GeometryDriver.hxx>
21 #include <XmlMDataXtd_PatternStdDriver.hxx>
22 #include <XmlMDataXtd_TriangulationDriver.hxx>
23 #include <XmlMDF_ADriverTable.hxx>
24
25 #include <XmlMDataXtd_PresentationDriver.hxx>
26 #include <XmlMDataXtd_PositionDriver.hxx>
27
28 static Standard_Integer myDocumentVersion = -1;
29 //=======================================================================
30 //function : AddDrivers
31 //purpose  : 
32 //=======================================================================
33 void XmlMDataXtd::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
34                               const Handle(Message_Messenger)&   anMsgDrv)
35 {
36   aDriverTable->AddDriver(new XmlMDataXtd_GeometryDriver      (anMsgDrv));
37   aDriverTable->AddDriver(new XmlMDataXtd_ConstraintDriver    (anMsgDrv));
38   aDriverTable->AddDriver(new XmlMDataXtd_PatternStdDriver    (anMsgDrv));
39   aDriverTable->AddDriver(new XmlMDataXtd_TriangulationDriver (anMsgDrv));
40
41   aDriverTable->AddDriver(new XmlMDataXtd_PresentationDriver  (anMsgDrv));
42   aDriverTable->AddDriver(new XmlMDataXtd_PositionDriver      (anMsgDrv));
43 }
44
45 //=======================================================================
46 //function : SetDocumentVersion
47 //purpose  : Sets current document version
48 //=======================================================================
49 void XmlMDataXtd::SetDocumentVersion(const Standard_Integer theVersion)
50 {
51   myDocumentVersion = theVersion;
52 }
53 //=======================================================================
54 //function : DocumentVersion
55 //purpose  : Retrieved document version
56 //=======================================================================
57 Standard_Integer XmlMDataXtd::DocumentVersion()
58 {
59   return myDocumentVersion;
60 }