Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:22:39

0001 // Created on: 2001-07-17
0002 // Created by: Julia DOROVSKIKH <jfa@hotdox.nnov.matra-dtv.fr>
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 _XmlObjMgt_Persistent_HeaderFile
0017 #define _XmlObjMgt_Persistent_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 
0022 #include <XmlObjMgt_Element.hxx>
0023 #include <Standard_Integer.hxx>
0024 #include <XmlObjMgt_DOMString.hxx>
0025 
0026 //! root for XML-persistence
0027 class XmlObjMgt_Persistent
0028 {
0029 public:
0030   DEFINE_STANDARD_ALLOC
0031 
0032   //! empty constructor
0033   Standard_EXPORT XmlObjMgt_Persistent();
0034 
0035   //! constructor
0036   Standard_EXPORT XmlObjMgt_Persistent(const XmlObjMgt_Element& theElement);
0037 
0038   //! constructor from sub-element of Element referenced by theRef
0039   Standard_EXPORT XmlObjMgt_Persistent(const XmlObjMgt_Element&   theElement,
0040                                        const XmlObjMgt_DOMString& theRef);
0041 
0042   //! myElement := <theType id="theID"/>
0043   Standard_EXPORT void CreateElement(XmlObjMgt_Element&         theParent,
0044                                      const XmlObjMgt_DOMString& theType,
0045                                      const int                  theID);
0046 
0047   Standard_EXPORT void SetId(const int theId);
0048 
0049   //! return myElement
0050   const XmlObjMgt_Element& Element() const;
0051   inline                   operator const XmlObjMgt_Element&() const;
0052 
0053   //! return myElement
0054   XmlObjMgt_Element& Element();
0055   inline             operator XmlObjMgt_Element&();
0056 
0057   int Id() const;
0058 
0059 private:
0060   XmlObjMgt_Element myElement;
0061   int               myID;
0062 };
0063 
0064 #include <XmlObjMgt_Persistent.lxx>
0065 
0066 #endif // _XmlObjMgt_Persistent_HeaderFile