// File generated by CPPExt (Transient)
//
//
//                     Copyright (C) 1991 - 2000 by  
//                      Matra Datavision SA.  All rights reserved.
//  
//                     Copyright (C) 2001 - 2004 by
//                     Open CASCADE SA.  All rights reserved.
// 
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//  
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.

#ifndef _BinLDrivers_DocumentRetrievalDriver_HeaderFile
#define _BinLDrivers_DocumentRetrievalDriver_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_BinLDrivers_DocumentRetrievalDriver_HeaderFile
#include <Handle_BinLDrivers_DocumentRetrievalDriver.hxx>
#endif

#ifndef _BinObjMgt_Persistent_HeaderFile
#include <BinObjMgt_Persistent.hxx>
#endif
#ifndef _Handle_BinMDF_ADriverTable_HeaderFile
#include <Handle_BinMDF_ADriverTable.hxx>
#endif
#ifndef _BinObjMgt_RRelocationTable_HeaderFile
#include <BinObjMgt_RRelocationTable.hxx>
#endif
#ifndef _Handle_CDM_MessageDriver_HeaderFile
#include <Handle_CDM_MessageDriver.hxx>
#endif
#ifndef _TColStd_MapOfInteger_HeaderFile
#include <TColStd_MapOfInteger.hxx>
#endif
#ifndef _BinLDrivers_VectorOfDocumentSection_HeaderFile
#include <BinLDrivers_VectorOfDocumentSection.hxx>
#endif
#ifndef _PCDM_RetrievalDriver_HeaderFile
#include <PCDM_RetrievalDriver.hxx>
#endif
#ifndef _Handle_PCDM_Document_HeaderFile
#include <Handle_PCDM_Document.hxx>
#endif
#ifndef _Handle_CDM_Document_HeaderFile
#include <Handle_CDM_Document.hxx>
#endif
#ifndef _Handle_CDM_Application_HeaderFile
#include <Handle_CDM_Application.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_IStream_HeaderFile
#include <Standard_IStream.hxx>
#endif
#ifndef _Storage_Position_HeaderFile
#include <Storage_Position.hxx>
#endif
#ifndef _Handle_Storage_HeaderData_HeaderFile
#include <Handle_Storage_HeaderData.hxx>
#endif
class BinMDF_ADriverTable;
class CDM_MessageDriver;
class TCollection_ExtendedString;
class PCDM_Document;
class CDM_Document;
class CDM_Application;
class TDF_Label;
class TCollection_AsciiString;
class Storage_HeaderData;
class BinLDrivers_DocumentSection;



class BinLDrivers_DocumentRetrievalDriver : public PCDM_RetrievalDriver {

public:
 // Methods PUBLIC
 // 

//! Constructor <br>
Standard_EXPORT BinLDrivers_DocumentRetrievalDriver();

//! pure virtual method definition <br>
Standard_EXPORT virtual  TCollection_ExtendedString SchemaName() const;

//! pure virtual method definition <br>
Standard_EXPORT virtual  void Make(const Handle(PCDM_Document)& PD,const Handle(CDM_Document)& TD) ;

//! pure virtual method definition <br>
Standard_EXPORT virtual  Handle_CDM_Document CreateDocument() ;

//! retrieves the content of the file into a new Document. <br>
Standard_EXPORT virtual  void Read(const TCollection_ExtendedString& theFileName,const Handle(CDM_Document)& theNewDocument,const Handle(CDM_Application)& theApplication) ;


Standard_EXPORT virtual  Handle_BinMDF_ADriverTable AttributeDrivers(const Handle(CDM_MessageDriver)& theMsgDriver) ;
//Standard_EXPORT ~BinLDrivers_DocumentRetrievalDriver();




 // Type management
 //
 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
 //Standard_EXPORT Standard_Boolean	       IsKind(const Handle(Standard_Type)&) const;

protected:

 // Methods PROTECTED
 // 

//! Read the tree from the stream <theIS> to <theLabel> <br>
Standard_EXPORT virtual  Standard_Integer ReadSubTree(Standard_IStream& theIS,const TDF_Label& theData) ;

//! Read the  info  section  of  theFile into theData, <br>
//!          return a file  position  corresponding to the info <br>
//!          section end <br>
Standard_EXPORT   Storage_Position ReadInfoSection(const TCollection_AsciiString& theFile,Handle(Storage_HeaderData)& theData) ;

//! define the procedure of reading a section to file. <br>
Standard_EXPORT virtual  void ReadSection(BinLDrivers_DocumentSection& theSection,const Handle(CDM_Document)& theDoc,Standard_IStream& theIS) ;


Standard_EXPORT   void ReadShapeSection(BinLDrivers_DocumentSection& theSection,Standard_IStream& theIS) ;

//! write  theMessage  to  the  MessageDriver  of  the <br>
//!          Application <br>
Standard_EXPORT   void WriteMessage(const TCollection_ExtendedString& theMessage) ;


 // Fields PROTECTED
 //
BinObjMgt_RRelocationTable myRelocTable;


private: 

 // Methods PRIVATE
 // 


 // Fields PRIVATE
 //
BinObjMgt_Persistent myPAtt;
Handle_BinMDF_ADriverTable myDrivers;
Handle_CDM_MessageDriver myMsgDriver;
TColStd_MapOfInteger myMapUnsupported;
BinLDrivers_VectorOfDocumentSection mySections;


};





// other Inline functions and methods (like "C++: function call" methods)
//


#endif
