0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / XmlObjMgt / XmlObjMgt_Persistent.hxx
CommitLineData
42cf5bc1 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
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 _XmlObjMgt_Persistent_HeaderFile
17#define _XmlObjMgt_Persistent_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_DefineAlloc.hxx>
21#include <Standard_Handle.hxx>
22
23#include <XmlObjMgt_Element.hxx>
24#include <Standard_Integer.hxx>
25#include <XmlObjMgt_DOMString.hxx>
26
27
28//! root for XML-persistence
29class XmlObjMgt_Persistent
30{
31public:
32
33 DEFINE_STANDARD_ALLOC
34
35
36 //! empty constructor
37 Standard_EXPORT XmlObjMgt_Persistent();
38
39 //! constructor
40 Standard_EXPORT XmlObjMgt_Persistent(const XmlObjMgt_Element& theElement);
41
42 //! constructor from sub-element of Element referenced by theRef
43 Standard_EXPORT XmlObjMgt_Persistent(const XmlObjMgt_Element& theElement, const XmlObjMgt_DOMString& theRef);
44
45 //! myElement := <theType id="theID"/>
46 Standard_EXPORT void CreateElement (XmlObjMgt_Element& theParent, const XmlObjMgt_DOMString& theType, const Standard_Integer theID);
47
48 Standard_EXPORT void SetId (const Standard_Integer theId);
49
50 //! return myElement
51 const XmlObjMgt_Element& Element() const;
52inline operator const XmlObjMgt_Element&() const;
53
54 //! return myElement
55 XmlObjMgt_Element& Element();
56inline operator XmlObjMgt_Element&();
57
58 Standard_Integer Id() const;
59
60
61
62
63protected:
64
65
66
67
68
69private:
70
71
72
73 XmlObjMgt_Element myElement;
74 Standard_Integer myID;
75
76
77};
78
79
80#include <XmlObjMgt_Persistent.lxx>
81
82
83
84
85
86#endif // _XmlObjMgt_Persistent_HeaderFile