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 #include <XmlMDataXtd.hxx>
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>
25 #include <XmlMDataXtd_PresentationDriver.hxx>
26 #include <XmlMDataXtd_PositionDriver.hxx>
28 static Standard_Integer myDocumentVersion = -1;
29 //=======================================================================
30 //function : AddDrivers
32 //=======================================================================
33 void XmlMDataXtd::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
34 const Handle(Message_Messenger)& anMsgDrv)
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));
41 aDriverTable->AddDriver(new XmlMDataXtd_PresentationDriver (anMsgDrv));
42 aDriverTable->AddDriver(new XmlMDataXtd_PositionDriver (anMsgDrv));
45 //=======================================================================
46 //function : SetDocumentVersion
47 //purpose : Sets current document version
48 //=======================================================================
49 void XmlMDataXtd::SetDocumentVersion(const Standard_Integer theVersion)
51 myDocumentVersion = theVersion;
53 //=======================================================================
54 //function : DocumentVersion
55 //purpose : Retrieved document version
56 //=======================================================================
57 Standard_Integer XmlMDataXtd::DocumentVersion()
59 return myDocumentVersion;