Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:16:30

0001 // Created on: 2001-07-25
0002 // Created by: Julia DOROVSKIKH
0003 // Copyright (c) 2001-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _XmlLDrivers_DocumentStorageDriver_HeaderFile
0017 #define _XmlLDrivers_DocumentStorageDriver_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <XmlLDrivers_NamespaceDef.hxx>
0023 #include <NCollection_Sequence.hxx>
0024 #include <TCollection_ExtendedString.hxx>
0025 #include <XmlObjMgt_SRelocationTable.hxx>
0026 #include <PCDM_StorageDriver.hxx>
0027 #include <XmlObjMgt_Element.hxx>
0028 #include <Standard_Integer.hxx>
0029 #include <TDocStd_FormatVersion.hxx>
0030 
0031 class XmlMDF_ADriverTable;
0032 class CDM_Document;
0033 class TCollection_AsciiString;
0034 class Message_Messenger;
0035 
0036 class XmlLDrivers_DocumentStorageDriver : public PCDM_StorageDriver
0037 {
0038 
0039 public:
0040   Standard_EXPORT XmlLDrivers_DocumentStorageDriver(const TCollection_ExtendedString& theCopyright);
0041 
0042   Standard_EXPORT void Write(
0043     const occ::handle<CDM_Document>&  theDocument,
0044     const TCollection_ExtendedString& theFileName,
0045     const Message_ProgressRange&      theRange = Message_ProgressRange()) override;
0046 
0047   Standard_EXPORT void Write(
0048     const occ::handle<CDM_Document>& theDocument,
0049     Standard_OStream&                theOStream,
0050     const Message_ProgressRange&     theRange = Message_ProgressRange()) override;
0051 
0052   Standard_EXPORT virtual occ::handle<XmlMDF_ADriverTable> AttributeDrivers(
0053     const occ::handle<Message_Messenger>& theMsgDriver);
0054 
0055   DEFINE_STANDARD_RTTIEXT(XmlLDrivers_DocumentStorageDriver, PCDM_StorageDriver)
0056 
0057 protected:
0058   Standard_EXPORT virtual bool WriteToDomDocument(
0059     const occ::handle<CDM_Document>& theDocument,
0060     XmlObjMgt_Element&               thePDoc,
0061     const Message_ProgressRange&     theRange = Message_ProgressRange());
0062 
0063   Standard_EXPORT virtual int MakeDocument(
0064     const occ::handle<CDM_Document>& theDocument,
0065     XmlObjMgt_Element&               thePDoc,
0066     const Message_ProgressRange&     theRange = Message_ProgressRange());
0067 
0068   Standard_EXPORT void AddNamespace(const TCollection_AsciiString& thePrefix,
0069                                     const TCollection_AsciiString& theURI);
0070 
0071   Standard_EXPORT virtual bool WriteShapeSection(
0072     XmlObjMgt_Element&           thePDoc,
0073     const TDocStd_FormatVersion  theStorageFormatVersion,
0074     const Message_ProgressRange& theRange = Message_ProgressRange());
0075 
0076   occ::handle<XmlMDF_ADriverTable> myDrivers;
0077   XmlObjMgt_SRelocationTable       myRelocTable;
0078 
0079 private:
0080   NCollection_Sequence<XmlLDrivers_NamespaceDef> mySeqOfNS;
0081   TCollection_ExtendedString                     myCopyright;
0082   TCollection_ExtendedString                     myFileName;
0083 };
0084 
0085 #endif // _XmlLDrivers_DocumentStorageDriver_HeaderFile