uTL
micro Template library
utl::istreamdev_it< cont_t, data_t > Class Template Reference

#include <dev_iterators.h>

Public Types

enum  Cursor { init = 0, valid = 1, eos = 2 }
 #define-like enumerator for Cursor-like behavior More...
 
using type = iterator_t
 
using iterator_category = typename dev_iterator_traits< std::output_iterator_tag, data_t, void >::iterator_category
 
using value_type = typename dev_iterator_traits< std::output_iterator_tag, data_t, void >::value_type
 
using difference_type = typename dev_iterator_traits< std::output_iterator_tag, data_t, void >::difference_type
 
using pointer = typename dev_iterator_traits< std::output_iterator_tag, data_t, void >::pointer
 
using reference = typename dev_iterator_traits< std::output_iterator_tag, data_t, void >::reference
 

Public Member Functions

Constructor / Destructor
 istreamdev_it (cont_t *owner=nullptr, Cursor cursor=eos) noexcept
 Basic constructor. More...
 
 istreamdev_it (const iterator_t &it) noexcept
 Basic copy constructor. More...
 
iterator_toperator= (const iterator_t &it) noexcept
 Basic copy assignment operator. More...
 
Public interface
value_typeoperator* () noexcept
 
value_typeoperator-> () noexcept
 
iterator_toperator++ () noexcept
 
iterator_t operator++ (int) noexcept
 
const cont_t * owner () const noexcept
 Export container for comparison. More...
 
const value_typevalue () const noexcept
 Export value for comparison. More...
 
const Cursor cursor () const noexcept
 Export cursor for comparison. More...
 

Private Types

using iterator_t = istreamdev_it< cont_t, data_t >
 

Private Member Functions

private api
void _get (value_type &v)
 

Private Attributes

Data members
cont_t * owner_ {nullptr}
 
value_type value_ {}
 
Cursor cursor_ {init}
 

Detailed Description

template<typename cont_t, typename data_t>
class utl::istreamdev_it< cont_t, data_t >

Definition at line 128 of file dev_iterators.h.

Member Typedef Documentation

◆ difference_type

template<typename cont_t, typename data_t>
using utl::istreamdev_it< cont_t, data_t >::difference_type = typename dev_iterator_traits <std::output_iterator_tag, data_t, void>::difference_type

Definition at line 137 of file dev_iterators.h.

◆ iterator_category

template<typename cont_t, typename data_t>
using utl::istreamdev_it< cont_t, data_t >::iterator_category = typename dev_iterator_traits <std::output_iterator_tag, data_t, void>::iterator_category

STL iterator traits "forwarding"

Definition at line 135 of file dev_iterators.h.

◆ iterator_t

template<typename cont_t, typename data_t>
using utl::istreamdev_it< cont_t, data_t >::iterator_t = istreamdev_it <cont_t, data_t>
private

Definition at line 129 of file dev_iterators.h.

◆ pointer

template<typename cont_t, typename data_t>
using utl::istreamdev_it< cont_t, data_t >::pointer = typename dev_iterator_traits <std::output_iterator_tag, data_t, void>::pointer

Definition at line 138 of file dev_iterators.h.

◆ reference

template<typename cont_t, typename data_t>
using utl::istreamdev_it< cont_t, data_t >::reference = typename dev_iterator_traits <std::output_iterator_tag, data_t, void>::reference

Definition at line 139 of file dev_iterators.h.

◆ type

template<typename cont_t, typename data_t>
using utl::istreamdev_it< cont_t, data_t >::type = iterator_t

Export type as identity meta-function

Definition at line 131 of file dev_iterators.h.

◆ value_type

template<typename cont_t, typename data_t>
using utl::istreamdev_it< cont_t, data_t >::value_type = typename dev_iterator_traits <std::output_iterator_tag, data_t, void>::value_type

Definition at line 136 of file dev_iterators.h.

Member Enumeration Documentation

◆ Cursor

template<typename cont_t, typename data_t>
enum utl::istreamdev_it::Cursor

#define-like enumerator for Cursor-like behavior

Enumerator
init 
valid 
eos 

Definition at line 142 of file dev_iterators.h.

Constructor & Destructor Documentation

◆ istreamdev_it() [1/2]

template<typename cont_t, typename data_t>
utl::istreamdev_it< cont_t, data_t >::istreamdev_it ( cont_t *  owner = nullptr,
Cursor  cursor = eos 
)
inlinenoexcept

Basic constructor.

Definition at line 163 of file dev_iterators.h.

◆ istreamdev_it() [2/2]

template<typename cont_t, typename data_t>
utl::istreamdev_it< cont_t, data_t >::istreamdev_it ( const iterator_t it)
inlinenoexcept

Basic copy constructor.

Definition at line 168 of file dev_iterators.h.

Member Function Documentation

◆ _get()

template<typename cont_t, typename data_t>
void utl::istreamdev_it< cont_t, data_t >::_get ( value_type v)
inlineprivate

Definition at line 213 of file dev_iterators.h.

◆ cursor()

template<typename cont_t, typename data_t>
const Cursor utl::istreamdev_it< cont_t, data_t >::cursor ( ) const
inlinenoexcept

Export cursor for comparison.

Definition at line 208 of file dev_iterators.h.

◆ operator*()

template<typename cont_t, typename data_t>
value_type& utl::istreamdev_it< cont_t, data_t >::operator* ( )
inlinenoexcept

Definition at line 183 of file dev_iterators.h.

◆ operator++() [1/2]

template<typename cont_t, typename data_t>
iterator_t& utl::istreamdev_it< cont_t, data_t >::operator++ ( )
inlinenoexcept

Definition at line 193 of file dev_iterators.h.

◆ operator++() [2/2]

template<typename cont_t, typename data_t>
iterator_t utl::istreamdev_it< cont_t, data_t >::operator++ ( int  )
inlinenoexcept

Definition at line 197 of file dev_iterators.h.

◆ operator->()

template<typename cont_t, typename data_t>
value_type* utl::istreamdev_it< cont_t, data_t >::operator-> ( )
inlinenoexcept

Definition at line 188 of file dev_iterators.h.

◆ operator=()

template<typename cont_t, typename data_t>
iterator_t& utl::istreamdev_it< cont_t, data_t >::operator= ( const iterator_t it)
inlinenoexcept

Basic copy assignment operator.

Definition at line 173 of file dev_iterators.h.

◆ owner()

template<typename cont_t, typename data_t>
const cont_t* utl::istreamdev_it< cont_t, data_t >::owner ( ) const
inlinenoexcept

Export container for comparison.

Definition at line 204 of file dev_iterators.h.

◆ value()

template<typename cont_t, typename data_t>
const value_type& utl::istreamdev_it< cont_t, data_t >::value ( ) const
inlinenoexcept

Export value for comparison.

Definition at line 206 of file dev_iterators.h.

Member Data Documentation

◆ cursor_

template<typename cont_t, typename data_t>
Cursor utl::istreamdev_it< cont_t, data_t >::cursor_ {init}
private

Definition at line 155 of file dev_iterators.h.

◆ owner_

template<typename cont_t, typename data_t>
cont_t* utl::istreamdev_it< cont_t, data_t >::owner_ {nullptr}
private

Pointer to parent/owner device class. Usable iterator demands owner container in order to access data. Considering the data don't "live" in memory.

Definition at line 149 of file dev_iterators.h.

◆ value_

template<typename cont_t, typename data_t>
value_type utl::istreamdev_it< cont_t, data_t >::value_ {}
private

Definition at line 154 of file dev_iterators.h.


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