Integration of OCCT 6.5.0 from SVN
[occt.git] / src / BinDrivers / BinDrivers_DocumentRetrievalDriver.cxx
CommitLineData
7fd59977 1// File: BinDrivers_DocumentRetrievalDriver.cxx
2// Created: 31.10.02 11:12:22
3// Author: Michael SAZONOV
4// Copyright: Open CASCADE 2002
5
6#include <BinDrivers_DocumentRetrievalDriver.ixx>
7#include <BinDrivers.hxx>
8#include <BinLDrivers_DocumentSection.hxx>
9#include <BinMNaming.hxx>
10#include <BinMNaming_NamedShapeDriver.hxx>
11#include <TNaming_NamedShape.hxx>
12#include <BinMDataStd.hxx>
13#include <TCollection_ExtendedString.hxx>
14#include <Standard_Failure.hxx>
15#include <Standard_IStream.hxx>
16#include <Standard_ErrorHandler.hxx>
17//=======================================================================
18//function : BinDrivers_DocumentRetrievalDriver
19//purpose : Constructor
20//=======================================================================
21
22BinDrivers_DocumentRetrievalDriver::BinDrivers_DocumentRetrievalDriver ()
23{
24}
25
26//=======================================================================
27//function : AttributeDrivers
28//purpose :
29//=======================================================================
30
31Handle(BinMDF_ADriverTable) BinDrivers_DocumentRetrievalDriver::AttributeDrivers
32 (const Handle(CDM_MessageDriver)& theMessageDriver)
33{
34 return BinDrivers::AttributeDrivers (theMessageDriver);
35}
36
37//=======================================================================
38//function : ReadShapeSection
39//purpose :
40//=======================================================================
41
42void BinDrivers_DocumentRetrievalDriver::ReadShapeSection
43 (BinLDrivers_DocumentSection& /*theSection*/,
44 Standard_IStream& theIS,
45 const Standard_Boolean /*isMess*/)
46
47{
48 // Read Shapes
49 Handle(BinMNaming_NamedShapeDriver) aNamedShapeDriver;
50 if (myDrivers->GetDriver(STANDARD_TYPE(TNaming_NamedShape),aNamedShapeDriver))
51 {
52 try {
53 OCC_CATCH_SIGNALS
54 aNamedShapeDriver->ReadShapeSection (theIS);
55 }
56 catch(Standard_Failure) {
57 Handle(Standard_Failure) aFailure = Standard_Failure::Caught();
58 const TCollection_ExtendedString aMethStr
59 ("BinDrivers_DocumentRetrievalDriver: ");
60 WriteMessage (aMethStr + "error of Shape Section " +
61 aFailure->GetMessageString());
62 }
63 }
64}
65
66//=======================================================================
67//function : CheckShapeSection
68//purpose :
69//=======================================================================
70void BinDrivers_DocumentRetrievalDriver::CheckShapeSection(
71 const Storage_Position& /*ShapeSectionPos*/,
72 Standard_IStream& /*IS*/)
73{}
74
75//=======================================================================
76//function : PropagateDocumentVersion
77//purpose :
78//=======================================================================
79void BinDrivers_DocumentRetrievalDriver::PropagateDocumentVersion(
80 const Standard_Integer theDocVersion )
81{
82 BinMDataStd::SetDocumentVersion(theDocVersion);
83 BinMNaming::SetDocumentVersion(theDocVersion);
84}
85