30#ifndef _util_xml_class_XMLAttributeList_
31#define _util_xml_class_XMLAttributeList_
58 template <
class T>
friend class RefPtr;
62 typedef std::map< std::string, std::string >
Map_t;
89 bool has(
const std::string&)
const;
93 const std::string&
get(
const std::string&)
const;
97 std::string
get(
const std::string&,
const std::string&)
const;
102 int get_int(
const std::string&)
const;
107 int get_int(
const std::string&,
int)
const;
117 double get_double(
const std::string&,
double)
const;
124 bool get_bool(
const std::string&)
const;
129 bool get_bool(
const std::string&,
bool)
const;
132 void set(
const std::string&,
const std::string&);
135 void set_int(
const std::string&,
int);
142 void set_bool(
const std::string&,
bool);
172 bool boolean_value(
const std::string&,
const char* where)
const;
Definition XMLAttributeList.h:57
iterator end()
Get an iterator past the last element.
Definition XMLAttributeList.cpp:301
void set_double(const std::string &, double)
Assign a numerical value to the given key.
Definition XMLAttributeList.cpp:266
virtual ~XMLAttributeList()
Destroy this list.
Definition XMLAttributeList.cpp:92
void set(const std::string &, const std::string &)
Assign a text attribute to the given key.
Definition XMLAttributeList.cpp:247
XMLAttributeList()
Construct a blank attribute list.
Definition XMLAttributeList.cpp:77
int size() const
Get the number of attributes in the list.
Definition XMLAttributeList.cpp:106
Map_t attribute_
The attributes.
Definition XMLAttributeList.h:158
Map_t::const_iterator const_iterator
Definition XMLAttributeList.h:66
std::map< std::string, std::string > Map_t
The container type used to hold the attributes.
Definition XMLAttributeList.h:62
void make_lower_case(std::string &) const
Definition XMLAttributeList.cpp:322
XMLAttributeList & operator=(const XMLAttributeList &)
Definition XMLAttributeList.cpp:99
Map_t::iterator iterator
The iterator type returned by this implementation.
Definition XMLAttributeList.h:65
iterator get_location(const std::string &)
Get an iterator pointing to the location of the given string.
Definition XMLAttributeList.cpp:333
double get_double(const std::string &) const
Definition XMLAttributeList.cpp:185
bool boolean_value(const std::string &, const char *where) const
Definition XMLAttributeList.cpp:361
iterator begin()
Get an iterator to the first element.
Definition XMLAttributeList.cpp:294
int get_int(const std::string &) const
Definition XMLAttributeList.cpp:145
void set_int(const std::string &, int)
Assign an integer value to the given key.
Definition XMLAttributeList.cpp:257
friend class ConstRefPtr
Definition XMLAttributeList.h:59
bool has(const std::string &) const
Return true if the given key is defined.
Definition XMLAttributeList.cpp:113
const std::string & get(const std::string &) const
Definition XMLAttributeList.cpp:120
bool get_bool(const std::string &) const
Definition XMLAttributeList.cpp:224
void set_bool(const std::string &, bool)
Definition XMLAttributeList.cpp:282