Iterator class for the variant. More...
#include <variant.hpp>
Public Types | |
| typedef variant | value_type |
| typedef std::bidirectional_iterator_tag | iterator_category |
| typedef variant & | reference |
| typedef variant * | pointer |
| typedef int | difference_type |
Public Member Functions | |
| variant_iterator () | |
| Constructor for a no-op iterator. More... | |
| variant_iterator (const variant_value_base *value, const utils::any &iter) | |
| Constructor for a generic iterator. More... | |
| variant | operator* () const |
| variant_iterator & | operator++ () |
| variant_iterator | operator++ (int) |
| variant_iterator & | operator-- () |
| variant_iterator | operator-- (int) |
| bool | operator== (const variant_iterator &that) const |
| bool | operator!= (const variant_iterator &that) const |
Private Attributes | |
| formula_variant::type | type_ |
| const variant_value_base * | container_ |
| utils::any | iter_ |
Iterator class for the variant.
Depending on the type_ the list_iterator_ and the map_iterator_ are a valid iterator or singular. Since most actions on singular iterators result in Undefined Behavior care should be taken when copying the list_iterator_ and map_iterator_.
Definition at line 193 of file variant.hpp.
| typedef int wfl::variant_iterator::difference_type |
Definition at line 200 of file variant.hpp.
| typedef std::bidirectional_iterator_tag wfl::variant_iterator::iterator_category |
Definition at line 197 of file variant.hpp.
| typedef variant* wfl::variant_iterator::pointer |
Definition at line 199 of file variant.hpp.
| typedef variant& wfl::variant_iterator::reference |
Definition at line 198 of file variant.hpp.
Definition at line 196 of file variant.hpp.
| wfl::variant_iterator::variant_iterator | ( | ) |
Constructor for a no-op iterator.
Definition at line 60 of file variant.cpp.
| wfl::variant_iterator::variant_iterator | ( | const variant_value_base * | value, |
| const utils::any & | iter | ||
| ) |
Constructor for a generic iterator.
iter is not singular.| value | A pointer to a variant value representing the container. |
| iter | An underlying iterator for the underlying container. |
Definition at line 67 of file variant.cpp.
| bool wfl::variant_iterator::operator!= | ( | const variant_iterator & | that | ) | const |
Definition at line 134 of file variant.cpp.
References operator==().
| variant wfl::variant_iterator::operator* | ( | ) | const |
Definition at line 74 of file variant.cpp.
References container_, wfl::variant_value_base::deref_iterator(), and iter_.
| variant_iterator & wfl::variant_iterator::operator++ | ( | ) |
Definition at line 83 of file variant.cpp.
References container_, iter_, and wfl::variant_value_base::iterator_inc().
| variant_iterator wfl::variant_iterator::operator++ | ( | int | ) |
Definition at line 92 of file variant.cpp.
References container_, iter_, and wfl::variant_value_base::iterator_inc().
| variant_iterator & wfl::variant_iterator::operator-- | ( | ) |
Definition at line 102 of file variant.cpp.
References container_, iter_, and wfl::variant_value_base::iterator_dec().
| variant_iterator wfl::variant_iterator::operator-- | ( | int | ) |
Definition at line 111 of file variant.cpp.
References container_, iter_, and wfl::variant_value_base::iterator_dec().
| bool wfl::variant_iterator::operator== | ( | const variant_iterator & | that | ) | const |
Definition at line 121 of file variant.cpp.
References container_, iter_, and wfl::variant_value_base::iterator_equals().
Referenced by operator!=().
|
private |
Definition at line 226 of file variant.hpp.
Referenced by operator*(), operator++(), operator--(), and operator==().
|
private |
Definition at line 227 of file variant.hpp.
Referenced by operator*(), operator++(), operator--(), and operator==().
|
private |
Definition at line 225 of file variant.hpp.