xmlwrapp
Lightweight C++ XML parsing library
|
Go to the documentation of this file.
39 #ifndef _xmlwrapp_attributes_h_
40 #define _xmlwrapp_attributes_h_
44 #include "xmlwrapp/export.h"
134 mutable std::string value_;
139 void swap(
attr& other);
141 void set_data(
void *
node,
void *prop);
142 void set_data(
const char *name,
const char *value,
bool);
144 friend class impl::ait_impl;
154 typedef std::ptrdiff_t difference_type;
157 typedef std::forward_iterator_tag iterator_category;
173 friend bool XMLWRAPP_API operator==(
const iterator& lhs,
const iterator& rhs);
174 friend bool XMLWRAPP_API operator!=(
const iterator& lhs,
const iterator& rhs);
177 impl::ait_impl *pimpl_;
180 iterator(
const char *name,
const char *value,
bool);
182 void* get_raw_attr();
195 typedef std::ptrdiff_t difference_type;
198 typedef std::forward_iterator_tag iterator_category;
219 impl::ait_impl *pimpl_;
224 void* get_raw_attr();
270 void insert(
const char *name,
const char *value);
336 struct pimpl; pimpl *pimpl_;
341 void set_data (
void *
node);
343 friend struct impl::node_impl;
349 #endif // _xmlwrapp_attributes_h_
const char * get_name() const
Get the name of this attribute.
void insert(const char *name, const char *value)
Add an attribute to the attributes list.
iterator find(const char *name)
Find the attribute with the given name.
const_iterator find(const char *name) const
Find the attribute with the given name.
const_iterator & operator++()
prefix increment
std::size_t size_type
size type
Definition: attributes.h:75
const_iterator begin() const
Get a const_iterator that points to the first attribute.
attributes(const attributes &other)
Copy construct a xml::attributes object.
iterator end()
Get an iterator that points one past the the last attribute.
void erase(const char *name)
Erase the attribute with the given name.
const_iterator end() const
Get a const_iterator that points one past the last attribute.
Const Iterator class for accessing attribute pairs.
Definition: attributes.h:192
size_type size() const
Find out how many attributes there are in this xml::attributes object.
bool empty() const
Find out if there are any attributes in this xml::attributes object.
iterator erase(iterator to_erase)
Erase the attribute that is pointed to by the given iterator.
Iterator class for accessing attribute pairs.
Definition: attributes.h:151
attributes & operator=(const attributes &other)
Copy the given xml::attributes object into this one.
XML library namespace.
Definition: attributes.h:52
iterator begin()
Get an iterator that points to the first attribute.
iterator & operator++()
prefix increment
const char * get_value() const
Get the value of this attribute.
attributes()
Create a new xml::attributes object with no attributes.
The xml::node class is used to hold information about one XML node.
Definition: node.h:89
iterator operator++(int)
postfix increment (avoid if possible for better performance)
The xml::attributes class is used to access all the attributes of one xml::node.
Definition: attributes.h:72
void swap(attributes &other)
Swap this xml::attributes object with another one.
The xml::attributes::attr class is used to hold information about one attribute.
Definition: attributes.h:114