0031353: TDocStd_Application does not have api to set progress indicator
[occt.git] / src / XmlMNaming / XmlMNaming_NamedShapeDriver.hxx
1 // Created on: 2001-09-14
2 // Created by: Alexander GRIGORIEV
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 _XmlMNaming_NamedShapeDriver_HeaderFile
17 #define _XmlMNaming_NamedShapeDriver_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
21
22 #include <BRepTools_ShapeSet.hxx>
23 #include <XmlMDF_ADriver.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <XmlObjMgt_RRelocationTable.hxx>
26 #include <XmlObjMgt_SRelocationTable.hxx>
27 #include <XmlObjMgt_Element.hxx>
28 class Message_Messenger;
29 class TDF_Attribute;
30 class XmlObjMgt_Persistent;
31 class TopTools_LocationSet;
32
33
34 class XmlMNaming_NamedShapeDriver;
35 DEFINE_STANDARD_HANDLE(XmlMNaming_NamedShapeDriver, XmlMDF_ADriver)
36
37
38 class XmlMNaming_NamedShapeDriver : public XmlMDF_ADriver
39 {
40 public:
41
42   Standard_EXPORT XmlMNaming_NamedShapeDriver(const Handle(Message_Messenger)& aMessageDriver);
43   
44   Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
45   
46   Standard_EXPORT virtual Standard_Boolean Paste
47                               (const XmlObjMgt_Persistent& theSource,
48                                const Handle(TDF_Attribute)& theTarget,
49                                XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
50   
51   Standard_EXPORT virtual void Paste
52                               (const Handle(TDF_Attribute)& theSource,
53                                XmlObjMgt_Persistent& theTarget,
54                                XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
55   
56   //! Input the shapes from DOM element
57   Standard_EXPORT void ReadShapeSection (const XmlObjMgt_Element& anElement,
58                                          const Handle(Message_ProgressIndicator)& theProgress = NULL);
59   
60   //! Output the shapes into DOM element
61   Standard_EXPORT void WriteShapeSection (XmlObjMgt_Element& anElement,
62                                           const Handle(Message_ProgressIndicator)& theProgress = NULL);
63   
64   //! Clear myShapeSet
65   Standard_EXPORT void Clear();
66   
67   //! get the format of topology
68     TopTools_LocationSet& GetShapesLocations();
69
70   DEFINE_STANDARD_RTTIEXT(XmlMNaming_NamedShapeDriver,XmlMDF_ADriver)
71
72 private:
73
74   BRepTools_ShapeSet myShapeSet;
75
76 };
77
78
79 #include <XmlMNaming_NamedShapeDriver.lxx>
80
81 #endif // _XmlMNaming_NamedShapeDriver_HeaderFile