1 // Created on: 2001-07-25
2 // Created by: Julia DOROVSKIKH
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _XmlLDrivers_DocumentStorageDriver_HeaderFile
17 #define _XmlLDrivers_DocumentStorageDriver_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
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 class XmlMDF_ADriverTable;
30 class TCollection_ExtendedString;
32 class TCollection_AsciiString;
33 class Message_Messenger;
36 class XmlLDrivers_DocumentStorageDriver;
37 DEFINE_STANDARD_HANDLE(XmlLDrivers_DocumentStorageDriver, PCDM_StorageDriver)
40 class XmlLDrivers_DocumentStorageDriver : public PCDM_StorageDriver
46 Standard_EXPORT XmlLDrivers_DocumentStorageDriver(const TCollection_ExtendedString& theCopyright);
48 Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument,
49 const TCollection_ExtendedString& theFileName,
50 const Handle(Message_ProgressIndicator)& theProgress = NULL) Standard_OVERRIDE;
52 Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument,
53 Standard_OStream& theOStream,
54 const Handle(Message_ProgressIndicator)& theProgress = NULL) Standard_OVERRIDE;
56 Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver);
61 DEFINE_STANDARD_RTTIEXT(XmlLDrivers_DocumentStorageDriver,PCDM_StorageDriver)
66 Standard_EXPORT virtual Standard_Boolean WriteToDomDocument
67 (const Handle(CDM_Document)& theDocument,
68 XmlObjMgt_Element& thePDoc,
69 const Handle(Message_ProgressIndicator)& theProgress = NULL);
71 Standard_EXPORT virtual Standard_Integer MakeDocument
72 (const Handle(CDM_Document)& theDocument,
73 XmlObjMgt_Element& thePDoc,
74 const Handle(Message_ProgressIndicator)& theProgress = NULL);
76 Standard_EXPORT void AddNamespace (const TCollection_AsciiString& thePrefix,
77 const TCollection_AsciiString& theURI);
79 Standard_EXPORT virtual Standard_Boolean WriteShapeSection
80 (XmlObjMgt_Element& thePDoc,
81 const Handle(Message_ProgressIndicator)& theProgress = NULL);
83 Handle(XmlMDF_ADriverTable) myDrivers;
84 XmlObjMgt_SRelocationTable myRelocTable;
90 XmlLDrivers_SequenceOfNamespaceDef mySeqOfNS;
91 TCollection_ExtendedString myCopyright;
92 TCollection_ExtendedString myFileName;
103 #endif // _XmlLDrivers_DocumentStorageDriver_HeaderFile