1 // Created on: 2002-10-30
2 // Created by: Michael SAZONOV
3 // Copyright (c) 2002-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 13.04.2009 Sergey Zaritchny
18 #include <BinMDataXtd.hxx>
19 #include <BinMDataXtd_ConstraintDriver.hxx>
20 #include <BinMDataXtd_GeometryDriver.hxx>
21 #include <BinMDataXtd_PatternStdDriver.hxx>
22 #include <BinMDF_ADriverTable.hxx>
23 #include <Message_Messenger.hxx>
24 #include <BinMDataXtd_PresentationDriver.hxx>
25 #include <BinMDataXtd_PositionDriver.hxx>
26 #include <BinMDataXtd_TriangulationDriver.hxx>
28 static Standard_Integer myDocumentVersion = -1;
29 //=======================================================================
30 //function : AddDrivers
32 //=======================================================================
34 void BinMDataXtd::AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable,
35 const Handle(Message_Messenger)& theMsgDriver)
37 theDriverTable->AddDriver (new BinMDataXtd_ConstraintDriver (theMsgDriver) );
38 theDriverTable->AddDriver (new BinMDataXtd_GeometryDriver (theMsgDriver) );
39 theDriverTable->AddDriver (new BinMDataXtd_PatternStdDriver (theMsgDriver) );
40 theDriverTable->AddDriver (new BinMDataXtd_TriangulationDriver(theMsgDriver) );
42 theDriverTable->AddDriver (new BinMDataXtd_PresentationDriver (theMsgDriver) );
43 theDriverTable->AddDriver (new BinMDataXtd_PositionDriver (theMsgDriver) );
46 //=======================================================================
47 //function : SetDocumentVersion
48 //purpose : Sets current document version
49 //=======================================================================
50 void BinMDataXtd::SetDocumentVersion(const Standard_Integer theVersion)
52 myDocumentVersion = theVersion;
54 //=======================================================================
55 //function : DocumentVersion
56 //purpose : Retrieved document version
57 //=======================================================================
58 Standard_Integer BinMDataXtd::DocumentVersion()
60 return myDocumentVersion;