57 #ifndef _xmlattribute_h
58 #define _xmlattribute_h
71 struct AttributeStruct;
82 AttributeStruct* AttributeData;
87 typedef void (*unspecified_bool_type)(
Attribute***);
96 explicit Attribute(AttributeStruct* attr);
102 operator unspecified_bool_type()
const;
108 bool operator!()
const;
115 bool operator==(
const Attribute& r)
const;
122 bool operator!=(
const Attribute& r)
const;
128 bool operator<(
const Attribute& r)
const;
134 bool operator>(
const Attribute& r)
const;
140 bool operator<=(
const Attribute& r)
const;
146 bool operator>=(
const Attribute& r)
const;
155 const Char8* Name()
const;
160 const Char8* Value()
const;
167 const Char8* AsString(
const Char8* def =
"")
const;
174 int AsInt(
int def = 0)
const;
181 unsigned int AsUint(
unsigned int def = 0)
const;
188 double AsDouble(
double def = 0)
const;
195 float AsFloat(
float def = 0)
const;
221 bool AsBool(
bool def =
false)
const;
228 bool SetName(
const Char8* rhs);
236 {
return SetName(rhs.c_str()); }
245 bool SetValue(
const Char8* rhs);
254 bool SetValue(
int rhs);
262 bool SetValue(
unsigned int rhs);
270 bool SetValue(
double rhs);
278 bool SetValue(
bool rhs);
286 {
return SetValue(
ToString(rhs).c_str()); }
295 {
return SetValue(rhs.c_str()); }
334 size_t HashValue()
const;
339 AttributeStruct* InternalObject()
const;
348 #endif // Include guard