0029220: Application Framework - replace CDM_MessageDriver interface by Message_Messe...
[occt.git] / src / XmlLDrivers / XmlLDrivers_DocumentStorageDriver.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_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>
29class XmlMDF_ADriverTable;
30class TCollection_ExtendedString;
31class CDM_Document;
32class TCollection_AsciiString;
83ae3591 33class Message_Messenger;
42cf5bc1 34
35
36class XmlLDrivers_DocumentStorageDriver;
37DEFINE_STANDARD_HANDLE(XmlLDrivers_DocumentStorageDriver, PCDM_StorageDriver)
38
39
40class XmlLDrivers_DocumentStorageDriver : public PCDM_StorageDriver
41{
42
43public:
44
45
46 Standard_EXPORT XmlLDrivers_DocumentStorageDriver(const TCollection_ExtendedString& theCopyright);
47
42cf5bc1 48 Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument, const TCollection_ExtendedString& theFileName) Standard_OVERRIDE;
4ff92abe 49
50 Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument, Standard_OStream& theOStream) Standard_OVERRIDE;
42cf5bc1 51
83ae3591 52 Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver);
42cf5bc1 53
54
55
56
92efcf78 57 DEFINE_STANDARD_RTTIEXT(XmlLDrivers_DocumentStorageDriver,PCDM_StorageDriver)
42cf5bc1 58
59protected:
60
61
4ff92abe 62 Standard_EXPORT virtual Standard_Boolean WriteToDomDocument (const Handle(CDM_Document)& theDocument, XmlObjMgt_Element& thePDoc);
42cf5bc1 63
64 Standard_EXPORT virtual Standard_Integer MakeDocument (const Handle(CDM_Document)& theDocument, XmlObjMgt_Element& thePDoc);
65
66 Standard_EXPORT void AddNamespace (const TCollection_AsciiString& thePrefix, const TCollection_AsciiString& theURI);
67
68 Standard_EXPORT virtual Standard_Boolean WriteShapeSection (XmlObjMgt_Element& thePDoc);
69
70 Handle(XmlMDF_ADriverTable) myDrivers;
71 XmlObjMgt_SRelocationTable myRelocTable;
72
73
74private:
75
76
77 XmlLDrivers_SequenceOfNamespaceDef mySeqOfNS;
78 TCollection_ExtendedString myCopyright;
4ff92abe 79 TCollection_ExtendedString myFileName;
42cf5bc1 80
81
82};
83
84
85
86
87
88
89
90#endif // _XmlLDrivers_DocumentStorageDriver_HeaderFile