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 CDM_MessageDriver;
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 TCollection_ExtendedString SchemaName() const Standard_OVERRIDE;
50 Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument, const TCollection_ExtendedString& theFileName) Standard_OVERRIDE;
52 Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument, Standard_OStream& theOStream) Standard_OVERRIDE;
54 Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(CDM_MessageDriver)& theMsgDriver);
59 DEFINE_STANDARD_RTTIEXT(XmlLDrivers_DocumentStorageDriver,PCDM_StorageDriver)
64 Standard_EXPORT virtual Standard_Boolean WriteToDomDocument (const Handle(CDM_Document)& theDocument, XmlObjMgt_Element& thePDoc);
66 Standard_EXPORT virtual Standard_Integer MakeDocument (const Handle(CDM_Document)& theDocument, XmlObjMgt_Element& thePDoc);
68 Standard_EXPORT void AddNamespace (const TCollection_AsciiString& thePrefix, const TCollection_AsciiString& theURI);
70 Standard_EXPORT virtual Standard_Boolean WriteShapeSection (XmlObjMgt_Element& thePDoc);
72 Handle(XmlMDF_ADriverTable) myDrivers;
73 XmlObjMgt_SRelocationTable myRelocTable;
79 XmlLDrivers_SequenceOfNamespaceDef mySeqOfNS;
80 TCollection_ExtendedString myCopyright;
81 TCollection_ExtendedString myFileName;
92 #endif // _XmlLDrivers_DocumentStorageDriver_HeaderFile