1 // Created on: 2001-07-17
2 // Created by: Julia DOROVSKIKH <jfa@hotdox.nnov.matra-dtv.fr>
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _XmlObjMgt_Persistent_HeaderFile
17 #define _XmlObjMgt_Persistent_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
23 #include <XmlObjMgt_Element.hxx>
24 #include <Standard_Integer.hxx>
25 #include <XmlObjMgt_DOMString.hxx>
28 //! root for XML-persistence
29 class XmlObjMgt_Persistent
37 Standard_EXPORT XmlObjMgt_Persistent();
40 Standard_EXPORT XmlObjMgt_Persistent(const XmlObjMgt_Element& theElement);
42 //! constructor from sub-element of Element referenced by theRef
43 Standard_EXPORT XmlObjMgt_Persistent(const XmlObjMgt_Element& theElement, const XmlObjMgt_DOMString& theRef);
45 //! myElement := <theType id="theID"/>
46 Standard_EXPORT void CreateElement (XmlObjMgt_Element& theParent, const XmlObjMgt_DOMString& theType, const Standard_Integer theID);
48 Standard_EXPORT void SetId (const Standard_Integer theId);
51 const XmlObjMgt_Element& Element() const;
52 inline operator const XmlObjMgt_Element&() const;
55 XmlObjMgt_Element& Element();
56 inline operator XmlObjMgt_Element&();
58 Standard_Integer Id() const;
73 XmlObjMgt_Element myElement;
74 Standard_Integer myID;
80 #include <XmlObjMgt_Persistent.lxx>
86 #endif // _XmlObjMgt_Persistent_HeaderFile