![]() |
zeep::xml::attribute_set — set of attributes and name_spaces. Is a node_list but with a set interface
// In header: <zeep/xml/node.hpp> class attribute_set : public zeep::xml::basic_node_list< attribute > { public: // types typedef basic_node_list< attribute > node_list; typedef typename node_list::node_type node_type; typedef typename node_list::iterator iterator; typedef typename node_list::const_iterator const_iterator; typedef std::size_t size_type; typedef std::string key_type; // attribute_set is a bit like a std::map and the key type is a std::string // construct/copy/destruct attribute_set(element &); attribute_set(element &, attribute_set &&); attribute_set(element &, const attribute_set &); attribute_set & operator=(const attribute_set &); attribute_set & operator=(attribute_set &&); // public member functions bool contains(const key_type &) const; const_iterator find(const key_type &) const; iterator find(const key_type &); template<typename... Args> std::pair< iterator, bool > emplace(Args...); std::pair< iterator, bool > emplace(node_type &&); iterator erase(const_iterator); iterator erase(iterator, iterator); size_type erase(const key_type); };
attribute_set
public
construct/copy/destructattribute_set(element & e);
attribute_set(element & e, attribute_set && as);
attribute_set(element & e, const attribute_set & as);
attribute_set & operator=(const attribute_set & l);
attribute_set & operator=(attribute_set && l);
attribute_set
public member functionsbool contains(const key_type & key) const;return true if the attribute with name key is defined
const_iterator find(const key_type & key) const;return const_iterator to the attribute with name key
iterator find(const key_type & key);return iterator to the attribute with name key
template<typename... Args> std::pair< iterator, bool > emplace(Args... args);emplace a newly constructed attribute with argumenst args
std::pair< iterator, bool > emplace(node_type && a);emplace an attribute move constructed from a
Returns: |
returns a std::pair with an iterator pointing to the inserted attribute and a boolean indicating if this attribute was inserted instead of replaced. |
iterator erase(const_iterator pos);remove attribute at position pos
iterator erase(iterator first, iterator last);remove attributes between first and last
size_type erase(const key_type key);remove attribute with name key