## Class template basic_node_list

zeep::xml::basic_node_list — basic_node_list, a base class for containers of nodes

## Synopsis

    // In header: <zeep/xml/node.hpp>

    template<typename NodeType>
    class basic_node_list {
    public:
      // types
      typedef NodeType                         node_type;
      typedef node_type                        value_type;
      typedef std::allocator< value_type >     allocator_type;
      typedef size_t                           size_type;
      typedef ptrdiff_t                        difference_type;
      typedef value_type &                     reference;
      typedef const value_type &               const_reference;
      typedef value_type *                     pointer;
      typedef const value_type *               const_pointer;
      typedef iterator_impl< node_type >       iterator;
      typedef iterator_impl< const node_type > const_iterator;

      // construct/copy/destruct
      basic_node_list(element &);
      ~basic_node_list();

      // protected member functions
      iterator insert_impl(const_iterator, node_type *);
      iterator erase_impl(const_iterator);

      // public member functions
      bool operator==(const basic_node_list &) const;
      bool operator!=(const basic_node_list &) const;
      iterator begin();
      iterator end();
      const_iterator cbegin();
      const_iterator cend();
      const_iterator begin() const;
      const_iterator end() const;
      value_type & front();
      const value_type & front() const;
      value_type & back();
      const value_type & back() const;
      bool empty() const;
      size_t size() const;
      void clear();
      void swap(basic_node_list &) noexcept;
      template<typename Compare> void sort(Compare);
    };

## Description

We have two container classes (node_list specializations) One is for attributes and name_spaces. The other is the node_list for nodes in elements. However, this list can present itself as node_list for elements hiding all other node types.

### `basic_node_list` public construct/copy/destruct

1.     basic_node_list(element & e);

2.     ~basic_node_list();

### `basic_node_list` protected member functions

1.     iterator insert_impl(const_iterator pos, node_type * n);

2.     iterator erase_impl(const_iterator pos);

### `basic_node_list` public member functions

1.     bool operator==(const basic_node_list & l) const;

2.     bool operator!=(const basic_node_list & l) const;

3.     iterator begin();

4.     iterator end();

5.     const_iterator cbegin();

6.     const_iterator cend();

7.     const_iterator begin() const;

8.     const_iterator end() const;

9.     value_type & front();

10.     const value_type & front() const;

11.     value_type & back();

12.     const value_type & back() const;

13.     bool empty() const;

14.     size_t size() const;

15.     void clear();

16.     void swap(basic_node_list & l) noexcept;

17.     template<typename Compare> void sort(Compare comp);

    sort the (direct) nodes in this list using comp as comparator