0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only...
[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>
9f45d35b 29#include <TDocStd_FormatVersion.hxx>
d9d03f10 30
42cf5bc1 31class XmlMDF_ADriverTable;
32class TCollection_ExtendedString;
33class CDM_Document;
34class TCollection_AsciiString;
83ae3591 35class Message_Messenger;
42cf5bc1 36
37
38class XmlLDrivers_DocumentStorageDriver;
39DEFINE_STANDARD_HANDLE(XmlLDrivers_DocumentStorageDriver, PCDM_StorageDriver)
40
41
42class XmlLDrivers_DocumentStorageDriver : public PCDM_StorageDriver
43{
44
45public:
46
47
48 Standard_EXPORT XmlLDrivers_DocumentStorageDriver(const TCollection_ExtendedString& theCopyright);
49
6d8f9f4a 50 Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument,
51 const TCollection_ExtendedString& theFileName,
7e785937 52 const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
4ff92abe 53
6d8f9f4a 54 Standard_EXPORT virtual void Write (const Handle(CDM_Document)& theDocument,
55 Standard_OStream& theOStream,
7e785937 56 const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
42cf5bc1 57
83ae3591 58 Standard_EXPORT virtual Handle(XmlMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver);
42cf5bc1 59
60
61
62
92efcf78 63 DEFINE_STANDARD_RTTIEXT(XmlLDrivers_DocumentStorageDriver,PCDM_StorageDriver)
42cf5bc1 64
65protected:
66
67
6d8f9f4a 68 Standard_EXPORT virtual Standard_Boolean WriteToDomDocument
69 (const Handle(CDM_Document)& theDocument,
70 XmlObjMgt_Element& thePDoc,
7e785937 71 const Message_ProgressRange& theRange = Message_ProgressRange());
42cf5bc1 72
6d8f9f4a 73 Standard_EXPORT virtual Standard_Integer MakeDocument
74 (const Handle(CDM_Document)& theDocument,
75 XmlObjMgt_Element& thePDoc,
7e785937 76 const Message_ProgressRange& theRange = Message_ProgressRange());
42cf5bc1 77
6d8f9f4a 78 Standard_EXPORT void AddNamespace (const TCollection_AsciiString& thePrefix,
79 const TCollection_AsciiString& theURI);
42cf5bc1 80
6d8f9f4a 81 Standard_EXPORT virtual Standard_Boolean WriteShapeSection
82 (XmlObjMgt_Element& thePDoc,
9f45d35b 83 const TDocStd_FormatVersion theStorageFormatVersion,
7e785937 84 const Message_ProgressRange& theRange = Message_ProgressRange());
42cf5bc1 85
86 Handle(XmlMDF_ADriverTable) myDrivers;
d9d03f10 87 XmlObjMgt_SRelocationTable myRelocTable;
42cf5bc1 88
89private:
90
91
92 XmlLDrivers_SequenceOfNamespaceDef mySeqOfNS;
93 TCollection_ExtendedString myCopyright;
4ff92abe 94 TCollection_ExtendedString myFileName;
42cf5bc1 95
96
97};
98
99
100
101
102
103
104
105#endif // _XmlLDrivers_DocumentStorageDriver_HeaderFile