0024059: Eliminate compiler warning C4701 in MSVC++ with warning level 4
[occt.git] / src / LDOM / LDOM_Element.hxx
1 // Created on: 2001-06-26
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2012 OPEN CASCADE SAS
4 //
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
9 //
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 //
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
19
20
21
22 #ifndef LDOM_Element_HeaderFile
23 #define LDOM_Element_HeaderFile
24
25 #include <LDOM_Attr.hxx>
26 #include <LDOM_NodeList.hxx>
27
28 class LDOMParser;
29 class LDOM_BasicElement;
30
31 //  Class LDOM_Element
32 //
33
34 class LDOM_Element : public LDOM_Node
35 {
36  public:
37   // ---------- PUBLIC METHODS ----------
38
39   LDOM_Element () {}
40   //    Empty constructor
41
42   LDOM_Element (const LDOM_Element& anOther) : LDOM_Node (anOther) {}
43   //    Copy constructor
44
45   LDOM_Element& operator =              (const LDOM_Element& anOther)
46                     { return (LDOM_Element&) LDOM_Node::operator = (anOther); }
47   //    Assignment
48
49   Standard_EXPORT LDOM_Element&
50                 operator =              (const LDOM_NullPtr * aNull)
51                     { return (LDOM_Element&) LDOM_Node::operator = (aNull); }
52   //    Nullify
53
54   LDOMString    getTagName              () const { return getNodeName(); }
55
56   Standard_EXPORT LDOMString
57                 getAttribute            (const LDOMString& aName) const; 
58
59   Standard_EXPORT LDOM_Attr
60                 getAttributeNode        (const LDOMString& aName) const;
61
62   Standard_EXPORT LDOM_NodeList
63                 getElementsByTagName    (const LDOMString& aName) const;
64
65   Standard_EXPORT void  setAttribute    (const LDOMString& aName,
66                                          const LDOMString& aValue);
67
68   Standard_EXPORT void  setAttributeNode(const LDOM_Attr& aNewAttr);
69
70   Standard_EXPORT void  removeAttribute (const LDOMString& aName);
71
72 //      AGV auxiliary API
73   Standard_EXPORT LDOM_Element
74                 GetChildByTagName       (const LDOMString& aTagName) const;
75
76   Standard_EXPORT LDOM_Element
77                 GetSiblingByTagName     () const;
78
79   Standard_EXPORT void
80                 ReplaceElement          (const LDOM_Element& anOther);
81   //    The old element is destroyed by the new one
82
83   Standard_EXPORT LDOM_NodeList
84                 GetAttributesList       () const;
85
86  protected:
87   friend class LDOM_Document;
88   friend class LDOMParser;
89   // ---------- PROTECTED METHODS ----------
90
91   LDOM_Element                          (const LDOM_BasicElement&       anElem,
92                                          const Handle(LDOM_MemManager)& aDoc);
93
94  private:
95   // ---------- PRIVATE FIELDS ----------
96
97 };
98
99
100 #endif