Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:36

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 
0027 //! root for XML-persistence
0028 class XmlObjMgt_Persistent 
0029 {
0030 public:
0031 
0032   DEFINE_STANDARD_ALLOC
0033 
0034   
0035   //! empty constructor
0036   Standard_EXPORT XmlObjMgt_Persistent();
0037   
0038   //! constructor
0039   Standard_EXPORT XmlObjMgt_Persistent(const XmlObjMgt_Element& theElement);
0040   
0041   //! constructor from sub-element of Element referenced by theRef
0042   Standard_EXPORT XmlObjMgt_Persistent(const XmlObjMgt_Element& theElement, const XmlObjMgt_DOMString& theRef);
0043   
0044   //! myElement := <theType id="theID"/>
0045   Standard_EXPORT void CreateElement (XmlObjMgt_Element& theParent, const XmlObjMgt_DOMString& theType, const Standard_Integer theID);
0046   
0047   Standard_EXPORT void SetId (const Standard_Integer 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     Standard_Integer Id() const;
0058 
0059 
0060 
0061 
0062 protected:
0063 
0064 
0065 
0066 
0067 
0068 private:
0069 
0070 
0071 
0072   XmlObjMgt_Element myElement;
0073   Standard_Integer myID;
0074 
0075 
0076 };
0077 
0078 
0079 #include <XmlObjMgt_Persistent.lxx>
0080 
0081 
0082 
0083 
0084 
0085 #endif // _XmlObjMgt_Persistent_HeaderFile