StormByte C++ Library 0.0.9999
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
StormByte::Iterable< Container >::ConstIterator Class Reference

Wrapper const iterator for Iterable. More...

#include <iterable.hxx>

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = typename Container::value_type
 
using difference_type = typename Container::difference_type
 
using pointer = typename Container::const_pointer
 
using reference = typename Container::const_reference
 

Public Member Functions

reference operator* () const
 Dereference operator.
 
pointer operator-> () const
 Arrow operator.
 
ConstIteratoroperator++ ()
 Pre-increment operator.
 
ConstIterator operator++ (int)
 Post-increment operator.
 
ConstIteratoroperator-- ()
 Pre-decrement operator.
 
ConstIterator operator-- (int)
 Post-decrement operator.
 
ConstIteratoroperator+= (difference_type n)
 Compound addition operator.
 
ConstIteratoroperator-= (difference_type n)
 Compound subtraction operator.
 
ConstIterator operator+ (difference_type n) const
 Addition operator.
 
ConstIterator operator- (difference_type n) const
 Subtraction operator.
 
difference_type operator- (const ConstIterator &other) const
 Subtraction operator between two const iterators.
 
bool operator== (const ConstIterator &other) const
 Subscript operator.
 
bool operator!= (const ConstIterator &other) const
 Inequality operator.
 

Friends

class Iterable
 

Detailed Description

template<typename Container>
class StormByte::Iterable< Container >::ConstIterator

Wrapper const iterator for Iterable.

Member Function Documentation

◆ operator!=()

template<typename Container >
bool StormByte::Iterable< Container >::ConstIterator::operator!= ( const ConstIterator other) const
inline

Inequality operator.

Parameters
otherThe other const iterator to compare
Returns
True if the const iterators are not equal, false otherwise

◆ operator*()

template<typename Container >
reference StormByte::Iterable< Container >::ConstIterator::operator* ( ) const
inline

Dereference operator.

Returns
Const reference to the current element

◆ operator+()

template<typename Container >
ConstIterator StormByte::Iterable< Container >::ConstIterator::operator+ ( difference_type  n) const
inline

Addition operator.

Parameters
nNumber of positions to advance
Returns
New const iterator advanced by n positions

◆ operator++() [1/2]

template<typename Container >
ConstIterator & StormByte::Iterable< Container >::ConstIterator::operator++ ( )
inline

Pre-increment operator.

Returns
Reference to the incremented const iterator

◆ operator++() [2/2]

template<typename Container >
ConstIterator StormByte::Iterable< Container >::ConstIterator::operator++ ( int  )
inline

Post-increment operator.

Returns
Const iterator before increment

◆ operator+=()

template<typename Container >
ConstIterator & StormByte::Iterable< Container >::ConstIterator::operator+= ( difference_type  n)
inline

Compound addition operator.

Parameters
nNumber of positions to advance
Returns
Reference to the advanced const iterator

◆ operator-() [1/2]

template<typename Container >
difference_type StormByte::Iterable< Container >::ConstIterator::operator- ( const ConstIterator other) const
inline

Subtraction operator between two const iterators.

Parameters
otherThe other const iterator to subtract
Returns
Difference in positions between the two const iterators

◆ operator-() [2/2]

template<typename Container >
ConstIterator StormByte::Iterable< Container >::ConstIterator::operator- ( difference_type  n) const
inline

Subtraction operator.

Parameters
nNumber of positions to retreat
Returns
New const iterator retreated by n positions

◆ operator--() [1/2]

template<typename Container >
ConstIterator & StormByte::Iterable< Container >::ConstIterator::operator-- ( )
inline

Pre-decrement operator.

Returns
Reference to the decremented const iterator

◆ operator--() [2/2]

template<typename Container >
ConstIterator StormByte::Iterable< Container >::ConstIterator::operator-- ( int  )
inline

Post-decrement operator.

Returns
Const iterator before decrement

◆ operator-=()

template<typename Container >
ConstIterator & StormByte::Iterable< Container >::ConstIterator::operator-= ( difference_type  n)
inline

Compound subtraction operator.

Parameters
nNumber of positions to retreat
Returns
Reference to the retreated const iterator

◆ operator->()

template<typename Container >
pointer StormByte::Iterable< Container >::ConstIterator::operator-> ( ) const
inline

Arrow operator.

Returns
Const pointer to the current element

◆ operator==()

template<typename Container >
bool StormByte::Iterable< Container >::ConstIterator::operator== ( const ConstIterator other) const
inline

Subscript operator.

Parameters
nIndex to access
Returns
Const reference to the element at index n

The documentation for this class was generated from the following file: