0025748: Parallel version of progress indicator
[occt.git] / src / XmlLDrivers / XmlLDrivers_DocumentRetrievalDriver.hxx
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>
28 #include <Storage_Data.hxx>
29 class XmlMDF_ADriverTable;
30 class TCollection_ExtendedString;
31 class PCDM_Document;
32 class CDM_Document;
33 class CDM_Application;
34 class Message_Messenger;
35 class XmlMDF_ADriver;
36
37
38 class XmlLDrivers_DocumentRetrievalDriver;
39 DEFINE_STANDARD_HANDLE(XmlLDrivers_DocumentRetrievalDriver, PCDM_RetrievalDriver)
40
41
42 class XmlLDrivers_DocumentRetrievalDriver : public PCDM_RetrievalDriver
43 {
44
45 public:
46
47   
48   Standard_EXPORT XmlLDrivers_DocumentRetrievalDriver();
49   
50   Standard_EXPORT virtual Handle(CDM_Document) CreateDocument() Standard_OVERRIDE;
51   
52   Standard_EXPORT virtual void Read (const TCollection_ExtendedString& theFileName, 
53                                      const Handle(CDM_Document)& theNewDocument,
54                                      const Handle(CDM_Application)& theApplication, 
55                                      const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
56
57   Standard_EXPORT virtual void Read (Standard_IStream&               theIStream,
58                                      const Handle(Storage_Data)&     theStorageData,
59                                      const Handle(CDM_Document)&     theDoc,
60                                      const Handle(CDM_Application)&  theApplication,
61                                      const Message_ProgressRange& theRange= Message_ProgressRange()) Standard_OVERRIDE;
62   
63   Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver);
64
65
66
67
68   DEFINE_STANDARD_RTTIEXT(XmlLDrivers_DocumentRetrievalDriver,PCDM_RetrievalDriver)
69
70 protected:
71
72   
73   Standard_EXPORT virtual void ReadFromDomDocument (const XmlObjMgt_Element& theDomElement, 
74                                                     const Handle(CDM_Document)& theNewDocument, 
75                                                     const Handle(CDM_Application)& theApplication, 
76                                                     const Message_ProgressRange& theRange = Message_ProgressRange());
77   
78   Standard_EXPORT virtual Standard_Boolean MakeDocument (const XmlObjMgt_Element& thePDoc, 
79                                                          const Handle(CDM_Document)& theTDoc, 
80                                                          const Message_ProgressRange& theRange = Message_ProgressRange());
81   
82   Standard_EXPORT virtual Handle(XmlMDF_ADriver) ReadShapeSection
83                                    (const XmlObjMgt_Element& thePDoc,
84                                     const Handle(Message_Messenger)& theMsgDriver,
85                                     const Message_ProgressRange& theRange = Message_ProgressRange());
86   
87   Standard_EXPORT virtual void ShapeSetCleaning (const Handle(XmlMDF_ADriver)& theDriver);
88
89   Handle(XmlMDF_ADriverTable) myDrivers;
90   XmlObjMgt_RRelocationTable  myRelocTable;
91   TCollection_ExtendedString  myFileName;
92
93
94 private:
95
96
97
98
99 };
100
101
102
103
104
105
106
107 #endif // _XmlLDrivers_DocumentRetrievalDriver_HeaderFile