7b967f73e52a29c20afadca2e855c3f5c0ceb0b2
[occt.git] / src / BinMDataXtd / BinMDataXtd.cxx
1 // Created on: 2002-10-30
2 // Created by: Michael SAZONOV
3 // Copyright (c) 2002-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 // modified   13.04.2009 Sergey Zaritchny
17
18 #include <BinMDataXtd.hxx>
19 #include <BinMDataXtd_AxisDriver.hxx>
20 #include <BinMDataXtd_ConstraintDriver.hxx>
21 #include <BinMDataXtd_GeometryDriver.hxx>
22 #include <BinMDataXtd_PatternStdDriver.hxx>
23 #include <BinMDataXtd_PlacementDriver.hxx>
24 #include <BinMDataXtd_PlaneDriver.hxx>
25 #include <BinMDataXtd_PointDriver.hxx>
26 #include <BinMDataXtd_ShapeDriver.hxx>
27 #include <BinMDF_ADriverTable.hxx>
28 #include <Message_Messenger.hxx>
29 #include <BinMDataXtd_PresentationDriver.hxx>
30 #include <BinMDataXtd_PositionDriver.hxx>
31 #include <BinMDataXtd_TriangulationDriver.hxx>
32
33 static Standard_Integer myDocumentVersion = -1;
34 //=======================================================================
35 //function : AddDrivers
36 //purpose  : 
37 //=======================================================================
38
39 void BinMDataXtd::AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable,
40                               const Handle(Message_Messenger)&   theMsgDriver)
41 {
42   theDriverTable->AddDriver (new BinMDataXtd_ConstraintDriver   (theMsgDriver) );
43   theDriverTable->AddDriver (new BinMDataXtd_GeometryDriver     (theMsgDriver) );
44   theDriverTable->AddDriver (new BinMDataXtd_PatternStdDriver   (theMsgDriver) );
45   theDriverTable->AddDriver (new BinMDataXtd_ShapeDriver        (theMsgDriver) );
46   theDriverTable->AddDriver (new BinMDataXtd_PointDriver        (theMsgDriver) );
47   theDriverTable->AddDriver (new BinMDataXtd_AxisDriver         (theMsgDriver) );
48   theDriverTable->AddDriver (new BinMDataXtd_PlaneDriver        (theMsgDriver) );
49   theDriverTable->AddDriver (new BinMDataXtd_PlacementDriver    (theMsgDriver) );
50   theDriverTable->AddDriver (new BinMDataXtd_TriangulationDriver(theMsgDriver) );
51
52   theDriverTable->AddDriver (new BinMDataXtd_PresentationDriver (theMsgDriver) );
53   theDriverTable->AddDriver (new BinMDataXtd_PositionDriver     (theMsgDriver) );
54 }
55
56 //=======================================================================
57 //function : SetDocumentVersion
58 //purpose  : Sets current document version
59 //=======================================================================
60 void BinMDataXtd::SetDocumentVersion(const Standard_Integer theVersion)
61 {
62   myDocumentVersion = theVersion;
63 }
64 //=======================================================================
65 //function : DocumentVersion
66 //purpose  : Retrieved document version
67 //=======================================================================
68 Standard_Integer BinMDataXtd::DocumentVersion()
69 {
70   return myDocumentVersion;
71 }