0032641: Coding - get rid of unused forward declarations [IGESAppli to LDOM]
[occt.git] / src / LDOM / LDOM_Element.hxx
1 // Created on: 2001-06-26
2 // Created by: Alexander GRIGORIEV
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 LDOM_Element_HeaderFile
17 #define LDOM_Element_HeaderFile
18
19 #include <LDOM_Attr.hxx>
20 #include <LDOM_NodeList.hxx>
21
22 class LDOM_BasicElement;
23
24 //  Class LDOM_Element
25 //
26
27 class LDOM_Element : public LDOM_Node
28 {
29  public:
30   // ---------- PUBLIC METHODS ----------
31
32   LDOM_Element () {}
33   //    Empty constructor
34
35   LDOM_Element (const LDOM_Element& anOther) : LDOM_Node (anOther) {}
36   //    Copy constructor
37
38   LDOM_Element& operator =              (const LDOM_Element& anOther)
39                     { return (LDOM_Element&) LDOM_Node::operator = (anOther); }
40   //    Assignment
41
42   LDOM_Element& operator =              (const LDOM_NullPtr * aNull)
43                     { return (LDOM_Element&) LDOM_Node::operator = (aNull); }
44   //    Nullify
45
46   LDOMString    getTagName              () const { return getNodeName(); }
47
48   Standard_EXPORT LDOMString
49                 getAttribute            (const LDOMString& aName) const; 
50
51   Standard_EXPORT LDOM_Attr
52                 getAttributeNode        (const LDOMString& aName) const;
53
54   Standard_EXPORT LDOM_NodeList
55                 getElementsByTagName    (const LDOMString& aName) const;
56
57   Standard_EXPORT void  setAttribute    (const LDOMString& aName,
58                                          const LDOMString& aValue);
59
60   Standard_EXPORT void  setAttributeNode(const LDOM_Attr& aNewAttr);
61
62   Standard_EXPORT void  removeAttribute (const LDOMString& aName);
63
64 //      AGV auxiliary API
65   Standard_EXPORT LDOM_Element
66                 GetChildByTagName       (const LDOMString& aTagName) const;
67
68   Standard_EXPORT LDOM_Element
69                 GetSiblingByTagName     () const;
70
71   Standard_EXPORT void
72                 ReplaceElement          (const LDOM_Element& anOther);
73   //    The old element is destroyed by the new one
74
75   Standard_EXPORT LDOM_NodeList
76                 GetAttributesList       () const;
77
78  protected:
79   friend class LDOM_Document;
80   friend class LDOMParser;
81   // ---------- PROTECTED METHODS ----------
82
83   LDOM_Element                          (const LDOM_BasicElement&       anElem,
84                                          const Handle(LDOM_MemManager)& aDoc);
85
86  private:
87   // ---------- PRIVATE FIELDS ----------
88
89 };
90
91
92 #endif