![]() |
zeep::xml::basic_node_list — basic_node_list, a base class for containers of nodes
// 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); };
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
protected member functionsiterator insert_impl(const_iterator pos, node_type * n);
iterator erase_impl(const_iterator pos);
basic_node_list
public member functionsbool operator==(const basic_node_list & l) const;
bool operator!=(const basic_node_list & l) 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 & l) noexcept;
template<typename Compare> void sort(Compare comp);sort the (direct) nodes in this list using comp as comparator