Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-13 09:20:18

0001 // Created on: 2001-09-14
0002 // Created by: Alexander GRIGORIEV
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 _XmlMNaming_NamedShapeDriver_HeaderFile
0017 #define _XmlMNaming_NamedShapeDriver_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <BRepTools_ShapeSet.hxx>
0023 #include <XmlMDF_ADriver.hxx>
0024 #include <TDocStd_FormatVersion.hxx>
0025 #include <XmlObjMgt_RRelocationTable.hxx>
0026 #include <XmlObjMgt_SRelocationTable.hxx>
0027 #include <XmlObjMgt_Element.hxx>
0028 class Message_Messenger;
0029 class TDF_Attribute;
0030 class XmlObjMgt_Persistent;
0031 class TopTools_LocationSet;
0032 
0033 class XmlMNaming_NamedShapeDriver;
0034 DEFINE_STANDARD_HANDLE(XmlMNaming_NamedShapeDriver, XmlMDF_ADriver)
0035 
0036 class XmlMNaming_NamedShapeDriver : public XmlMDF_ADriver
0037 {
0038 public:
0039   Standard_EXPORT XmlMNaming_NamedShapeDriver(const Handle(Message_Messenger)& aMessageDriver);
0040 
0041   Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0042 
0043   Standard_EXPORT virtual Standard_Boolean Paste(const XmlObjMgt_Persistent&  theSource,
0044                                                  const Handle(TDF_Attribute)& theTarget,
0045                                                  XmlObjMgt_RRelocationTable&  theRelocTable) const
0046     Standard_OVERRIDE;
0047 
0048   Standard_EXPORT virtual void Paste(const Handle(TDF_Attribute)& theSource,
0049                                      XmlObjMgt_Persistent&        theTarget,
0050                                      XmlObjMgt_SRelocationTable&  theRelocTable) const
0051     Standard_OVERRIDE;
0052 
0053   //! Input the shapes from DOM element
0054   Standard_EXPORT void ReadShapeSection(
0055     const XmlObjMgt_Element&     anElement,
0056     const Message_ProgressRange& theRange = Message_ProgressRange());
0057 
0058   //! Output the shapes into DOM element
0059   Standard_EXPORT void WriteShapeSection(
0060     XmlObjMgt_Element&           anElement,
0061     TDocStd_FormatVersion        theStorageFormatVersion,
0062     const Message_ProgressRange& theRange = Message_ProgressRange());
0063 
0064   //! Clear myShapeSet
0065   Standard_EXPORT void Clear();
0066 
0067   //! get the format of topology
0068   TopTools_LocationSet& GetShapesLocations();
0069 
0070   DEFINE_STANDARD_RTTIEXT(XmlMNaming_NamedShapeDriver, XmlMDF_ADriver)
0071 
0072 private:
0073   BRepTools_ShapeSet myShapeSet;
0074 };
0075 
0076 #include <XmlMNaming_NamedShapeDriver.lxx>
0077 
0078 #endif // _XmlMNaming_NamedShapeDriver_HeaderFile