Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:12

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