1 // Created on: 2001-06-26
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef LDOM_BasicAttribute_HeaderFile
17 #define LDOM_BasicAttribute_HeaderFile
19 #include <LDOM_BasicNode.hxx>
20 #include <LDOMBasicString.hxx>
27 // Class LDOM_BasicAttribute
30 class LDOM_BasicAttribute : public LDOM_BasicNode
33 // ---------- PUBLIC METHODS ----------
35 LDOM_BasicAttribute () : LDOM_BasicNode (LDOM_Node::UNKNOWN) {}
38 LDOM_BasicAttribute& operator = (const LDOM_NullPtr * aNull);
41 const char * GetName () const { return myName; }
43 const LDOMBasicString& GetValue () const { return myValue; }
45 void SetValue (const LDOMBasicString& aValue,
46 const Handle(LDOM_MemManager)& aDoc)
47 { myValue = LDOMString (aValue, aDoc); }
50 friend class LDOM_Node;
51 friend class LDOM_Attr;
52 friend class LDOM_Element;
53 friend class LDOM_BasicElement;
54 friend class LDOM_XmlReader;
56 // ---------- PRIVATE METHODS ----------
58 LDOM_BasicAttribute (const LDOMBasicString& aName)
59 : LDOM_BasicNode (LDOM_Node::ATTRIBUTE_NODE), myName (aName.GetString()) {}
62 static LDOM_BasicAttribute& Create (const LDOMBasicString& theName,
63 const Handle(LDOM_MemManager)& theDoc,
64 Standard_Integer& theHashIndex);
66 LDOM_BasicAttribute (const LDOM_Attr& anAttr);
69 // ---------- PRIVATE FIELDS ----------
71 // LDOMBasicString myName;
73 LDOMBasicString myValue;