Template Class iterator_impl
Defined in File node.hpp
Class Documentation
-
template<typename T>
class iterator_impl generic iterator class.
We can have iterators that point to nodes, elements and attributes. Iterating over nodes is simply following next/prev. But iterating elements is a bit more difficult, since you then have to skip nodes in between that are not an element, like comments or text.
This iterator is used for iterators over elements, attributes and simply all nodes
Public Types
-
using iterator_category = std::bidirectional_iterator_tag
-
using pointer = value_type*
-
using reference = value_type&
-
using difference_type = std::ptrdiff_t
Public Functions
-
iterator_impl() = default
-
iterator_impl(const iterator_impl &i) = default
-
template<typename Iterator>
inline iterator_impl(const Iterator &i) Copy constructor.
This copy constructor allows to copy from the same value_type and from derived types. That means that you can assign an iterator pointing to an element to a new iterator pointing to nodes. But vice versa is not possible.
-
inline iterator_impl &operator=(iterator_impl i)
-
template<typename Iterator>
inline iterator_impl &operator=(const Iterator &i)
-
inline iterator_impl &operator++()
-
inline iterator_impl operator++(int)
-
inline iterator_impl &operator--()
-
inline iterator_impl operator--(int)
-
template<typename IteratorType>
inline bool operator==(const IteratorType &other) const
-
inline bool operator==(const iterator_impl &other) const
-
using iterator_category = std::bidirectional_iterator_tag