Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-24 08:18:01

0001 // Created on: 2001-06-26
0002 // Created by: Alexander GRIGORIEV
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 LDOM_Element_HeaderFile
0017 #define LDOM_Element_HeaderFile
0018 
0019 #include <LDOM_Attr.hxx>
0020 #include <LDOM_NodeList.hxx>
0021 
0022 class LDOM_BasicElement;
0023 
0024 //  Class LDOM_Element
0025 //
0026 
0027 class LDOM_Element : public LDOM_Node
0028 {
0029 public:
0030   // ---------- PUBLIC METHODS ----------
0031 
0032   LDOM_Element() {}
0033 
0034   //    Empty constructor
0035 
0036   LDOM_Element(const LDOM_Element& anOther)
0037       : LDOM_Node(anOther)
0038   {
0039   }
0040 
0041   //    Copy constructor
0042 
0043   LDOM_Element& operator=(const LDOM_Element& anOther)
0044   {
0045     return (LDOM_Element&)LDOM_Node::operator=(anOther);
0046   }
0047 
0048   //    Assignment
0049 
0050   LDOM_Element& operator=(const LDOM_NullPtr* aNull)
0051   {
0052     return (LDOM_Element&)LDOM_Node::operator=(aNull);
0053   }
0054 
0055   //    Nullify
0056 
0057   LDOMString getTagName() const { return getNodeName(); }
0058 
0059   Standard_EXPORT LDOMString getAttribute(const LDOMString& aName) const;
0060 
0061   Standard_EXPORT LDOM_Attr getAttributeNode(const LDOMString& aName) const;
0062 
0063   Standard_EXPORT LDOM_NodeList getElementsByTagName(const LDOMString& aName) const;
0064 
0065   Standard_EXPORT void setAttribute(const LDOMString& aName, const LDOMString& aValue);
0066 
0067   Standard_EXPORT void setAttributeNode(const LDOM_Attr& aNewAttr);
0068 
0069   Standard_EXPORT void removeAttribute(const LDOMString& aName);
0070 
0071   //      AGV auxiliary API
0072   Standard_EXPORT LDOM_Element GetChildByTagName(const LDOMString& aTagName) const;
0073 
0074   Standard_EXPORT LDOM_Element GetSiblingByTagName() const;
0075 
0076   Standard_EXPORT void ReplaceElement(const LDOM_Element& anOther);
0077   //    The old element is destroyed by the new one
0078 
0079   Standard_EXPORT LDOM_NodeList GetAttributesList() const;
0080 
0081 protected:
0082   friend class LDOM_Document;
0083   friend class LDOMParser;
0084   // ---------- PROTECTED METHODS ----------
0085 
0086   LDOM_Element(const LDOM_BasicElement& anElem, const Handle(LDOM_MemManager)& aDoc);
0087 
0088 private:
0089   // ---------- PRIVATE FIELDS ----------
0090 };
0091 
0092 #endif