## Class attribute_set

zeep::xml::attribute_set — set of attributes and name_spaces. Is a node_list but with a set interface

## Synopsis

    // 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 &&) noexcept;

      // 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);
    };

## Description

### `attribute_set` public construct/copy/destruct

1.     attribute_set(element & e);

2.     attribute_set(element & e, attribute_set && as);

3.     attribute_set(element & e, const attribute_set & as);

4.     attribute_set & operator=(const attribute_set & l);

5.     attribute_set & operator=(attribute_set && l) noexcept;

### `attribute_set` public member functions

1.     bool contains(const key_type & key) const;

   return true if the attribute with name key is defined

2.     const_iterator find(const key_type & key) const;

   return const_iterator to the attribute with name key

3.     iterator find(const key_type & key);

   return iterator to the attribute with name key

4.     template<typename... Args> std::pair< iterator, bool > emplace(Args... args);

   emplace a newly constructed attribute with argumenst args

5.     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.

6.     iterator erase(const_iterator pos);

   remove attribute at position pos

7.     iterator erase(iterator first, iterator last);

   remove attributes between first and last

8.     size_type erase(const key_type key);

   remove attribute with name key