66 template <
typename Container>
77 using pointer =
typename Container::pointer;
87 using iterator_category =
typename std::iterator_traits<typename Container::iterator>::iterator_category;
88 using value_type =
typename std::iterator_traits<typename Container::iterator>::value_type;
89 using difference_type =
typename std::iterator_traits<typename Container::iterator>::difference_type;
90 using pointer =
typename std::iterator_traits<typename Container::iterator>::pointer;
91 using reference =
typename std::iterator_traits<typename Container::iterator>::reference;
174 typename Container::iterator m_it;
190 using iterator_category =
typename std::iterator_traits<typename Container::const_iterator>::iterator_category;
191 using value_type =
typename std::iterator_traits<typename Container::const_iterator>::value_type;
192 using difference_type =
typename std::iterator_traits<typename Container::const_iterator>::difference_type;
193 using pointer =
typename std::iterator_traits<typename Container::const_iterator>::pointer;
194 using reference =
typename std::iterator_traits<typename Container::const_iterator>::reference;
277 typename Container::const_iterator m_it;
533#include <StormByte/iterable.txx>
Const iterator adapter over Container::const_iterator.
Definition iterable.hxx:187
ConstIterator operator++(int)
Post-increment.
ConstIterator & operator-=(difference_type n)
Retreat in place.
ConstIterator & operator--()
Pre-decrement.
typename std::iterator_traits< typename Container::const_iterator >::iterator_category iterator_category
Matches the underlying container iterator; not assumed random-access.
Definition iterable.hxx:190
ConstIterator operator-(difference_type n) const
Iterator moved back by n.
typename std::iterator_traits< typename Container::const_iterator >::value_type value_type
Definition iterable.hxx:191
reference operator*() const
Dereference.
pointer operator->() const
Member access.
typename std::iterator_traits< typename Container::const_iterator >::pointer pointer
Definition iterable.hxx:193
ConstIterator operator+(difference_type n) const
Iterator advanced by n.
bool operator!=(const ConstIterator &other) const
Inequality.
ConstIterator & operator++()
Pre-increment.
ConstIterator operator--(int)
Post-decrement.
bool operator==(const ConstIterator &other) const
Equality.
typename std::iterator_traits< typename Container::const_iterator >::difference_type difference_type
Definition iterable.hxx:192
typename std::iterator_traits< typename Container::const_iterator >::reference reference
Definition iterable.hxx:194
difference_type operator-(const ConstIterator &other) const
Distance to other.
ConstIterator & operator+=(difference_type n)
Advance in place.
Mutable iterator adapter over Container::iterator.
Definition iterable.hxx:84
Iterator & operator++()
Pre-increment.
bool operator!=(const Iterator &other) const
Inequality.
typename std::iterator_traits< typename Container::iterator >::difference_type difference_type
Definition iterable.hxx:89
reference operator*()
Dereference.
typename std::iterator_traits< typename Container::iterator >::value_type value_type
Definition iterable.hxx:88
Iterator & operator+=(difference_type n)
Advance in place.
typename std::iterator_traits< typename Container::iterator >::pointer pointer
Definition iterable.hxx:90
Iterator operator++(int)
Post-increment.
Iterator operator--(int)
Post-decrement.
Iterator & operator-=(difference_type n)
Retreat in place.
Iterator operator+(difference_type n) const
Iterator advanced by n.
bool operator==(const Iterator &other) const
Equality.
Iterator & operator--()
Pre-decrement.
Iterator operator-(difference_type n) const
Iterator moved back by n.
typename std::iterator_traits< typename Container::iterator >::reference reference
Definition iterable.hxx:91
typename std::iterator_traits< typename Container::iterator >::iterator_category iterator_category
Matches the underlying container iterator; not assumed random-access.
Definition iterable.hxx:87
pointer operator->()
Member access.
difference_type operator-(const Iterator &other) const
Distance to other.
Wrapper that adds a uniform iteration and mutation API around a standard container.
Definition iterable.hxx:67
Iterable(C &&data)
Builds from a container.
const_reverse_iterator crbegin() const noexcept
Const reverse begin.
const_iterator cend() const noexcept
Const end.
typename Container::size_type size_type
Container::size_type.
Definition iterable.hxx:73
std::reverse_iterator< iterator > reverse_iterator
Mutable reverse adapter.
Definition iterable.hxx:288
reverse_iterator rend() noexcept
Mutable reverse end.
Iterable(Iterable &&)=default
Move constructor.
bool has_key(const K &key) const
Key lookup for associative containers.
bool has_item(const value_type &value) const
Linear search for an equal element.
iterator end() noexcept
Mutable end.
const_iterator cbegin() const noexcept
Const begin.
reverse_iterator rbegin() noexcept
Mutable reverse begin.
Iterable()=default
Empty iterable.
typename Container::value_type value_type
Container::value_type.
Definition iterable.hxx:72
bool empty() const noexcept
Whether the container is empty.
Iterable(const Iterable &other)
Copy constructor.
void add(T &&value)
Inserts value via push_back, else push_front, else associative insert.
typename Container::const_pointer const_pointer
Container::const_pointer.
Definition iterable.hxx:78
typename Container::pointer pointer
Container::pointer.
Definition iterable.hxx:77
size_type size() const noexcept
Element count.
Container m_data
Underlying container.
Definition iterable.hxx:69
typename Container::reference reference
Container::reference.
Definition iterable.hxx:75
typename Container::difference_type difference_type
Container::difference_type.
Definition iterable.hxx:74
std::reverse_iterator< const_iterator > const_reverse_iterator
Const reverse adapter.
Definition iterable.hxx:289
iterator begin() noexcept
Mutable begin.
const_reverse_iterator crend() const noexcept
Const reverse end.
typename Container::const_reference const_reference
Container::const_reference.
Definition iterable.hxx:76
Type that can actually be copy-constructed.
Definition object_semantics.hxx:188
Lvalue reference type (std::is_lvalue_reference).
Definition categories.hxx:97
Type that can be move-constructed.
Definition object_semantics.hxx:212
Same type after stripping cv and references from both sides.
Definition relations.hxx:94
Root namespace of the StormByte suite.
Octet count. Defined in byte_size.hxx. Forwarded so Type::Numeral can name it.