File indexing completed on 2025-01-18 10:04:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef LDOM_BasicAttribute_HeaderFile
0017 #define LDOM_BasicAttribute_HeaderFile
0018
0019 #include <LDOM_BasicNode.hxx>
0020 #include <LDOMBasicString.hxx>
0021
0022 class LDOM_Attr;
0023
0024
0025
0026
0027 class LDOM_BasicAttribute : public LDOM_BasicNode
0028 {
0029 public:
0030
0031
0032 LDOM_BasicAttribute () : LDOM_BasicNode (LDOM_Node::UNKNOWN), myName(NULL) {}
0033
0034
0035 LDOM_BasicAttribute& operator = (const LDOM_NullPtr * aNull);
0036
0037
0038 const char * GetName () const { return myName; }
0039
0040 const LDOMBasicString& GetValue () const { return myValue; }
0041
0042 void SetValue (const LDOMBasicString& aValue,
0043 const Handle(LDOM_MemManager)& aDoc)
0044 { myValue = LDOMString (aValue, aDoc); }
0045
0046 private:
0047 friend class LDOM_Node;
0048 friend class LDOM_Attr;
0049 friend class LDOM_Element;
0050 friend class LDOM_BasicElement;
0051 friend class LDOM_XmlReader;
0052
0053
0054
0055 LDOM_BasicAttribute (const LDOMBasicString& aName)
0056 : LDOM_BasicNode (LDOM_Node::ATTRIBUTE_NODE), myName (aName.GetString()) {}
0057
0058
0059 static LDOM_BasicAttribute& Create (const LDOMBasicString& theName,
0060 const Handle(LDOM_MemManager)& theDoc,
0061 Standard_Integer& theHashIndex);
0062
0063 LDOM_BasicAttribute (const LDOM_Attr& anAttr);
0064
0065 private:
0066
0067
0068
0069 const char * myName;
0070 LDOMBasicString myValue;
0071 };
0072
0073 #endif