0025748: Parallel version of progress indicator
[occt.git] / src / XmlLDrivers / XmlLDrivers_DocumentStorageDriver.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_DocumentStorageDriver_HeaderFile
17 #define _XmlLDrivers_DocumentStorageDriver_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
21
22 #include <XmlLDrivers_SequenceOfNamespaceDef.hxx>
23 #include <TCollection_ExtendedString.hxx>
24 #include <XmlObjMgt_SRelocationTable.hxx>
25 #include <PCDM_StorageDriver.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <XmlObjMgt_Element.hxx>
28 #include <Standard_Integer.hxx>
29
30 class XmlMDF_ADriverTable;
31 class TCollection_ExtendedString;
32 class CDM_Document;
33 class TCollection_AsciiString;
34 class Message_Messenger;
35
36
37 class XmlLDrivers_DocumentStorageDriver;
38 DEFINE_STANDARD_HANDLE(XmlLDrivers_DocumentStorageDriver, PCDM_StorageDriver)
39
40
41 class XmlLDrivers_DocumentStorageDriver : public PCDM_StorageDriver
42 {
43
44 public:
45
46   
47   Standard_EXPORT XmlLDrivers_DocumentStorageDriver(const TCollection_ExtendedString& theCopyright);
48   
49   Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument, 
50                                       const TCollection_ExtendedString& theFileName,
51                                       const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
52
53   Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument, 
54                                       Standard_OStream& theOStream,
55                                       const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
56   
57   Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver);
58
59
60
61
62   DEFINE_STANDARD_RTTIEXT(XmlLDrivers_DocumentStorageDriver,PCDM_StorageDriver)
63
64 protected:
65
66   
67   Standard_EXPORT virtual Standard_Boolean WriteToDomDocument
68                                 (const Handle(CDM_Document)& theDocument, 
69                                  XmlObjMgt_Element& thePDoc,
70                                  const Message_ProgressRange& theRange = Message_ProgressRange());
71   
72   Standard_EXPORT virtual Standard_Integer MakeDocument
73                                 (const Handle(CDM_Document)& theDocument,
74                                  XmlObjMgt_Element& thePDoc, 
75                                  const Message_ProgressRange& theRange = Message_ProgressRange());
76   
77   Standard_EXPORT void AddNamespace (const TCollection_AsciiString& thePrefix,
78                                      const TCollection_AsciiString& theURI);
79   
80   Standard_EXPORT virtual Standard_Boolean WriteShapeSection
81                                 (XmlObjMgt_Element& thePDoc, 
82                                  const Message_ProgressRange& theRange = Message_ProgressRange());
83
84   Handle(XmlMDF_ADriverTable) myDrivers;
85   XmlObjMgt_SRelocationTable  myRelocTable;
86
87 private:
88
89
90   XmlLDrivers_SequenceOfNamespaceDef mySeqOfNS;
91   TCollection_ExtendedString myCopyright;
92   TCollection_ExtendedString myFileName;
93
94
95 };
96
97
98
99
100
101
102
103 #endif // _XmlLDrivers_DocumentStorageDriver_HeaderFile