0026961: Recover possibility to read files in old persistence format -- preparation
[occt.git] / src / XmlLDrivers / XmlLDrivers_DocumentRetrievalDriver.hxx
CommitLineData
42cf5bc1 1// Created on: 2001-07-25
2// Created by: Julia DOROVSKIKH
3// Copyright (c) 2001-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#ifndef _XmlLDrivers_DocumentRetrievalDriver_HeaderFile
17#define _XmlLDrivers_DocumentRetrievalDriver_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <XmlObjMgt_RRelocationTable.hxx>
23#include <TCollection_ExtendedString.hxx>
24#include <PCDM_RetrievalDriver.hxx>
25#include <XmlObjMgt_Element.hxx>
26#include <Standard_Boolean.hxx>
27#include <Standard_Integer.hxx>
4ff92abe 28#include <Storage_Data.hxx>
42cf5bc1 29class XmlMDF_ADriverTable;
30class TCollection_ExtendedString;
31class PCDM_Document;
32class CDM_Document;
33class CDM_Application;
34class CDM_MessageDriver;
35class XmlMDF_ADriver;
36
37
38class XmlLDrivers_DocumentRetrievalDriver;
39DEFINE_STANDARD_HANDLE(XmlLDrivers_DocumentRetrievalDriver, PCDM_RetrievalDriver)
40
41
42class XmlLDrivers_DocumentRetrievalDriver : public PCDM_RetrievalDriver
43{
44
45public:
46
47
48 Standard_EXPORT XmlLDrivers_DocumentRetrievalDriver();
49
42cf5bc1 50 Standard_EXPORT virtual Handle(CDM_Document) CreateDocument() Standard_OVERRIDE;
51
52 Standard_EXPORT virtual void Read (const TCollection_ExtendedString& theFileName, const Handle(CDM_Document)& theNewDocument, const Handle(CDM_Application)& theApplication) Standard_OVERRIDE;
4ff92abe 53
54 Standard_EXPORT virtual void Read (Standard_IStream& theIStream,
55 const Handle(Storage_Data)& theStorageData,
56 const Handle(CDM_Document)& theDoc,
57 const Handle(CDM_Application)& theApplication) Standard_OVERRIDE;
42cf5bc1 58
59 Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(CDM_MessageDriver)& theMsgDriver);
60
61
62
63
92efcf78 64 DEFINE_STANDARD_RTTIEXT(XmlLDrivers_DocumentRetrievalDriver,PCDM_RetrievalDriver)
42cf5bc1 65
66protected:
67
68
69 Standard_EXPORT virtual void ReadFromDomDocument (const XmlObjMgt_Element& theDomElement, const Handle(CDM_Document)& theNewDocument, const Handle(CDM_Application)& theApplication);
70
71 Standard_EXPORT virtual Standard_Boolean MakeDocument (const XmlObjMgt_Element& thePDoc, const Handle(CDM_Document)& theTDoc);
72
73 Standard_EXPORT virtual Handle(XmlMDF_ADriver) ReadShapeSection (const XmlObjMgt_Element& thePDoc, const Handle(CDM_MessageDriver)& theMsgDriver);
74
75 Standard_EXPORT virtual void ShapeSetCleaning (const Handle(XmlMDF_ADriver)& theDriver);
76
77 Standard_EXPORT virtual void PropagateDocumentVersion (const Standard_Integer theDocVersion);
78
79 Handle(XmlMDF_ADriverTable) myDrivers;
80 XmlObjMgt_RRelocationTable myRelocTable;
81 TCollection_ExtendedString myFileName;
82
83
84private:
85
86
87
88
89};
90
91
92
93
94
95
96
97#endif // _XmlLDrivers_DocumentRetrievalDriver_HeaderFile