4 #include "ace/OS_NS_string.h"
7 ACEXML_Attribute::ACEXML_Attribute ()
17 ACEXML_Attribute::ACEXML_Attribute (const ACEXML_Attribute &attr)
18 : uri_ (ACE::strnew (attr.uri_)),
19 localName_ (ACE::strnew (attr.localName_)),
20 qName_ (ACE::strnew (attr.qName_)),
21 type_ (ACE::strnew (attr.type_)),
22 value_ (ACE::strnew (attr.value_))
27 ACEXML_Attribute::ACEXML_Attribute (const ACEXML_Char *uri,
28 const ACEXML_Char *localName,
29 const ACEXML_Char *qName,
30 const ACEXML_Char *type,
31 const ACEXML_Char *value)
32 : uri_ (ACE::strnew (uri)),
33 localName_ (ACE::strnew (localName)),
34 qName_ (ACE::strnew (qName)),
35 type_ (ACE::strnew (type)),
36 value_ (ACE::strnew (value))
41 ACEXML_Attribute::~ACEXML_Attribute ()
44 delete[] this->localName_;
45 delete[] this->qName_;
47 delete[] this->value_;
50 ACEXML_INLINE const ACEXML_Char *
51 ACEXML_Attribute::uri () const
57 ACEXML_Attribute::uri (const ACEXML_Char *uri)
60 this->uri_ = ACE::strnew (uri);
63 ACEXML_INLINE const ACEXML_Char *
64 ACEXML_Attribute::localName () const
66 return this->localName_;
70 ACEXML_Attribute::localName (const ACEXML_Char *localName)
72 delete[] this->localName_;
73 this->localName_ = ACE::strnew (localName);
76 ACEXML_INLINE const ACEXML_Char *
77 ACEXML_Attribute::qName () const
83 ACEXML_Attribute::qName (const ACEXML_Char *qName)
85 delete[] this->qName_;
86 this->qName_ = ACE::strnew (qName);
89 ACEXML_INLINE const ACEXML_Char *
90 ACEXML_Attribute::type () const
96 ACEXML_Attribute::type (const ACEXML_Char *type)
99 this->type_ = ACE::strnew (type);
102 ACEXML_INLINE const ACEXML_Char *
103 ACEXML_Attribute::value () const
109 ACEXML_Attribute::value (const ACEXML_Char *value)
111 delete[] this->value_;
112 this->value_ = ACE::strnew (value);
116 ACEXML_Attribute::setAttribute (const ACEXML_Char *uri,
117 const ACEXML_Char *localName,
118 const ACEXML_Char *qName,
119 const ACEXML_Char *type,
120 const ACEXML_Char *value)
124 this->localName (localName);
129 ACEXML_INLINE ACEXML_Attribute &
130 ACEXML_Attribute::operator= (const ACEXML_Attribute &rhs)
132 if (this != &rhs) // Check for self assignment
134 this->uri (rhs.uri ());
135 this->qName (rhs.qName ());
136 this->localName (rhs.localName ());
137 this->type (rhs.type ());
138 this->value (rhs.value ());
144 ACEXML_Attribute::operator!= (const ACEXML_Attribute &rhs) const
146 return (ACE_OS::strcmp (this->uri_, rhs.uri ()) == 0 &&
147 ACE_OS::strcmp (this->localName_, rhs.localName ()) == 0 &&
148 ACE_OS::strcmp (this->qName_, rhs .qName ()) == 0 &&
149 ACE_OS::strcmp (this->type_, rhs.type ()) == 0 &&
150 ACE_OS::strcmp (this->value_, rhs.value ()) == 0 ? false : true);