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

#include <dev_iterators.h>

Public Types

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
 ostreamdev_it (cont_t *owner=nullptr) noexcept
 Basic constructor. More...
 
 ostreamdev_it (const iterator_t &it) noexcept
 Basic copy constructor. More...
 
iterator_toperator= (const iterator_t &it) noexcept
 Basic copy assignment operator. More...
 
Public interface
iterator_toperator* () noexcept
 
iterator_toperator= (const value_type &value)
 Value-assignment operation. Where the output method is invoked. More...
 
iterator_toperator++ () noexcept
 
iterator_toperator++ (int) noexcept
 

Private Types

using iterator_t = ostreamdev_it< cont_t, data_t >
 

Private Attributes

cont_t * owner_ {nullptr}
 

Detailed Description

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

Definition at line 69 of file dev_iterators.h.

Member Typedef Documentation

◆ difference_type

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

Definition at line 78 of file dev_iterators.h.

◆ iterator_category

template<typename cont_t , typename data_t >
using utl::ostreamdev_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 76 of file dev_iterators.h.

◆ iterator_t

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

Definition at line 70 of file dev_iterators.h.

◆ pointer

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

Definition at line 79 of file dev_iterators.h.

◆ reference

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

Definition at line 80 of file dev_iterators.h.

◆ type

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

Export type as identity meta-function

Definition at line 72 of file dev_iterators.h.

◆ value_type

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

Definition at line 77 of file dev_iterators.h.

Constructor & Destructor Documentation

◆ ostreamdev_it() [1/2]

template<typename cont_t , typename data_t >
utl::ostreamdev_it< cont_t, data_t >::ostreamdev_it ( cont_t *  owner = nullptr)
inlinenoexcept

Basic constructor.

Definition at line 96 of file dev_iterators.h.

◆ ostreamdev_it() [2/2]

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

Basic copy constructor.

Definition at line 99 of file dev_iterators.h.

Member Function Documentation

◆ operator*()

template<typename cont_t , typename data_t >
iterator_t& utl::ostreamdev_it< cont_t, data_t >::operator* ( )
inlinenoexcept

Definition at line 110 of file dev_iterators.h.

◆ operator++() [1/2]

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

Definition at line 122 of file dev_iterators.h.

◆ operator++() [2/2]

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

Definition at line 123 of file dev_iterators.h.

◆ operator=() [1/2]

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

Basic copy assignment operator.

Definition at line 102 of file dev_iterators.h.

◆ operator=() [2/2]

template<typename cont_t , typename data_t >
iterator_t& utl::ostreamdev_it< cont_t, data_t >::operator= ( const value_type value)
inline

Value-assignment operation. Where the output method is invoked.

Parameters
valueAn instance of Cont_t::data_type
Returns
This iterator, for chained operations.

Definition at line 117 of file dev_iterators.h.

Member Data Documentation

◆ owner_

template<typename cont_t , typename data_t >
cont_t* utl::ostreamdev_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. A default constructed iterator will behave like end() just like the input version does.

Definition at line 84 of file dev_iterators.h.


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