NiHu  2.0
NiHu::casted_iterator< FromIt, To, Through > Class Template Reference

iterator class provides access to its value_t after static cast More...

#include <casted_iterator.hpp>

Public Types

typedef casted_iterator type
 self returning metafunction
 
typedef FromIt::difference_type difference_type
 
typedef To value_type
 the new value type
 
typedef To value_t
 

Public Member Functions

const FromIt & base () const
 
FromIt & base ()
 
 casted_iterator (FromIt const &base=FromIt())
 (copy) constructor from base iterator More...
 
bool operator!= (casted_iterator const &other) const
 
bool operator== (casted_iterator const &other) const
 
casted_iterator operator+ (difference_type offset) const
 
casted_iterator operator- (difference_type offset) const
 
difference_type operator- (casted_iterator const &other) const
 
casted_iteratoroperator++ ()
 
casted_iterator operator++ (int)
 
const value_t & operator* (void) const
 dereference operator converts dereferenced element to casted type More...
 
const value_t & operator[] (size_t idx) const
 index operator converts indexed element to casted type More...
 
const value_t * operator-> (void) const
 dereference operator converts dereferenced element to casted type More...
 

Detailed Description

template<class FromIt, class To, class Through = To>
class NiHu::casted_iterator< FromIt, To, Through >

iterator class provides access to its value_t after static cast

Template Parameters
FromItthe original iterator type
Tothe new value type
Throughan intermediate value type if needed for static cast

Definition at line 37 of file casted_iterator.hpp.

Constructor & Destructor Documentation

◆ casted_iterator()

template<class FromIt , class To , class Through = To>
NiHu::casted_iterator< FromIt, To, Through >::casted_iterator ( FromIt const &  base = FromIt())
inline

(copy) constructor from base iterator

Parameters
[in]basebase iterator

Definition at line 64 of file casted_iterator.hpp.

Member Function Documentation

◆ operator*()

template<class FromIt , class To , class Through = To>
const value_t& NiHu::casted_iterator< FromIt, To, Through >::operator* ( void  ) const
inline

dereference operator converts dereferenced element to casted type

Returns
the referred casted type class

Definition at line 108 of file casted_iterator.hpp.

◆ operator->()

template<class FromIt , class To , class Through = To>
const value_t* NiHu::casted_iterator< FromIt, To, Through >::operator-> ( void  ) const
inline

dereference operator converts dereferenced element to casted type

Returns
the referred casted type pointer

Definition at line 128 of file casted_iterator.hpp.

◆ operator[]()

template<class FromIt , class To , class Through = To>
const value_t& NiHu::casted_iterator< FromIt, To, Through >::operator[] ( size_t  idx) const
inline

index operator converts indexed element to casted type

Returns
the referred casted type class

Definition at line 118 of file casted_iterator.hpp.


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