1 // Created on: 2001-08-27
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // modified 20.04.2009 Sergey Zaritchny
18 #include <CDM_MessageDriver.hxx>
19 #include <XmlMDataXtd.hxx>
20 #include <XmlMDataXtd_AxisDriver.hxx>
21 #include <XmlMDataXtd_ConstraintDriver.hxx>
22 #include <XmlMDataXtd_GeometryDriver.hxx>
23 #include <XmlMDataXtd_PatternStdDriver.hxx>
24 #include <XmlMDataXtd_PlacementDriver.hxx>
25 #include <XmlMDataXtd_PlaneDriver.hxx>
26 #include <XmlMDataXtd_PointDriver.hxx>
27 #include <XmlMDataXtd_ShapeDriver.hxx>
28 #include <XmlMDF_ADriverTable.hxx>
30 #include <XmlMDataXtd_PresentationDriver.hxx>
31 #include <XmlMDataXtd_PositionDriver.hxx>
33 static Standard_Integer myDocumentVersion = -1;
34 //=======================================================================
35 //function : AddDrivers
37 //=======================================================================
38 void XmlMDataXtd::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
39 const Handle(CDM_MessageDriver)& anMsgDrv)
41 aDriverTable->AddDriver(new XmlMDataXtd_ShapeDriver (anMsgDrv));
42 aDriverTable->AddDriver(new XmlMDataXtd_PointDriver (anMsgDrv));
43 aDriverTable->AddDriver(new XmlMDataXtd_AxisDriver (anMsgDrv));
44 aDriverTable->AddDriver(new XmlMDataXtd_PlaneDriver (anMsgDrv));
45 aDriverTable->AddDriver(new XmlMDataXtd_GeometryDriver (anMsgDrv));
46 aDriverTable->AddDriver(new XmlMDataXtd_ConstraintDriver (anMsgDrv));
47 aDriverTable->AddDriver(new XmlMDataXtd_PlacementDriver (anMsgDrv));
48 aDriverTable->AddDriver(new XmlMDataXtd_PatternStdDriver (anMsgDrv));
50 aDriverTable->AddDriver(new XmlMDataXtd_PresentationDriver (anMsgDrv));
51 aDriverTable->AddDriver(new XmlMDataXtd_PositionDriver (anMsgDrv));
54 //=======================================================================
55 //function : SetDocumentVersion
56 //purpose : Sets current document version
57 //=======================================================================
58 void XmlMDataXtd::SetDocumentVersion(const Standard_Integer theVersion)
60 myDocumentVersion = theVersion;
62 //=======================================================================
63 //function : DocumentVersion
64 //purpose : Retrieved document version
65 //=======================================================================
66 Standard_Integer XmlMDataXtd::DocumentVersion()
68 return myDocumentVersion;