utl::indev_it< cont_t, iter_t, _beg, _size > Class Template Reference

Input device iterator type. We "future call" interface methods from owner class to provide iterator functionality. More...

`#include <dev_iterators.h>`

## Public Types

enum | Cursor { beg = _beg, eod = _beg + _size }
| #define-like enumerator for Cursor More...
using | type = iterator_t
using | iterator_category = typename dev_iterator_traits< std::output_iterator_tag, iter_t >::iterator_category
using | value_type = typename dev_iterator_traits< std::output_iterator_tag, iter_t >::value_type
using | difference_type = typename dev_iterator_traits< std::output_iterator_tag, iter_t >::difference_type
using | pointer = typename dev_iterator_traits< std::output_iterator_tag, iter_t >::pointer
using | reference = typename dev_iterator_traits< std::output_iterator_tag, iter_t >::reference

## Public Member Functions

Constructor / Destructor

Note
  We can not provide a default constructor as long as we depend on container_t (the owner type).

| indev_it () noexcept
| Default constructor. More...
| indev_it (cont_t *own, size_t cur=eod) noexcept
| Basic constructor. More...
| indev_it (const iterator_t &it) noexcept
| Basic copy constructor. More...
iterator_t & | operator= (const iterator_t &it) noexcept
| Basic copy assignment operator. More...
Public interface

Iterator to const-iterator conversion (as STL requires)

Parameters

  it | Iterator reference

reference | operator* ()
| De-reference operator. No end() place dereference check is made. More...
pointer | operator-> ()
| Arrow operator. No end() place dereference check is made. More...
iterator_t & | operator++ ()
| Pre increment. More...
iterator_t | operator++ (int)
| Post increment. More...
iterator_t & | operator-- ()
| Pre decrement. More...
iterator_t | operator-- (int)
| Post decrement. More...
reference | operator[] (difference_type n)
| [] operator. Is a combination of input method and dereference More...
iterator_t & | operator+= (difference_type n)
iterator_t | operator+ (difference_type n)
iterator_t & | operator-= (difference_type n)
iterator_t | operator- (difference_type n)
const cont_t * | owner () const noexcept
| Export container for comparison. More...
const index_t | cursor () const noexcept
| Export cursor for comparison. More...

## Private Types

using | iterator_t = indev_it< cont_t, iter_t, _beg, _size >
| < iterator type local name More...

## Private Attributes

cont_t * | owner_ {nullptr}
index_t | cursor_ {eod}
| virtual cursor for comparison operators More...
value_type | value_ {}
| The current value, used as cache. More...

## Detailed Description

### template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>
class utl::indev_it< cont_t, iter_t, _beg, _size >

Input device iterator type. We "future call" interface methods from owner class to provide iterator functionality.

Value meta-programming function for SPI interface checking

Parameters

  _Tp | Type to check

Returns
  True if _Tp is a spi interface

Parameters

  cont_t | Container/parent type
  iter_t | Iterator data type (pointer to container_t::value_type)
  _beg | Device starting address
  _size | Device's address space size

Definition at line 461 of file dev_iterators.h.

## Member Typedef Documentation

## difference_type

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

using utl::indev_it< cont_t, iter_t, _beg, _size >::difference_type = typename dev_iterator_traits <std::output_iterator_tag, iter_t>::difference_type

Definition at line 471 of file dev_iterators.h.

## iterator_category

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

using utl::indev_it< cont_t, iter_t, _beg, _size >::iterator_category = typename dev_iterator_traits <std::output_iterator_tag, iter_t>::iterator_category

STL iterator traits "forwarding"

Definition at line 469 of file dev_iterators.h.

## iterator_t

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

using utl::indev_it< cont_t, iter_t, _beg, _size >::iterator_t = indev_it <cont_t, iter_t, _beg, _size>

private

< iterator type local name

Definition at line 463 of file dev_iterators.h.

## pointer

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

using utl::indev_it< cont_t, iter_t, _beg, _size >::pointer = typename dev_iterator_traits <std::output_iterator_tag, iter_t>::pointer

Definition at line 472 of file dev_iterators.h.

## reference

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

using utl::indev_it< cont_t, iter_t, _beg, _size >::reference = typename dev_iterator_traits <std::output_iterator_tag, iter_t>::reference

Definition at line 473 of file dev_iterators.h.

## type

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

using utl::indev_it< cont_t, iter_t, _beg, _size >::type = iterator_t

Export type as identity meta-function

Definition at line 465 of file dev_iterators.h.

## value_type

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

using utl::indev_it< cont_t, iter_t, _beg, _size >::value_type = typename dev_iterator_traits <std::output_iterator_tag, iter_t>::value_type

Definition at line 470 of file dev_iterators.h.

## Member Enumeration Documentation

## Cursor

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

enum utl::indev_it::Cursor

#define-like enumerator for Cursor

Enumerator
beg | Points the first item.
eod | Points one place after last item.

Definition at line 477 of file dev_iterators.h.

## Constructor & Destructor Documentation

## indev_it() [1/3]

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

utl::indev_it< cont_t, iter_t, _beg, _size >::indev_it | ( |  | ) |

inlinenoexcept

Default constructor.

Definition at line 500 of file dev_iterators.h.

## indev_it() [2/3]

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

utl::indev_it< cont_t, iter_t, _beg, _size >::indev_it | ( | cont_t * | own,
|  | size_t | cur = `eod`
| ) |  |

inlineexplicitnoexcept

Basic constructor.

Definition at line 505 of file dev_iterators.h.

## indev_it() [3/3]

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

utl::indev_it< cont_t, iter_t, _beg, _size >::indev_it | ( | const iterator_t & | it | ) |

inlineexplicitnoexcept

Basic copy constructor.

Definition at line 510 of file dev_iterators.h.

## Member Function Documentation

## cursor()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

const index_t utl::indev_it< cont_t, iter_t, _beg, _size >::cursor | ( |  | ) | const

inlinenoexcept

Export cursor for comparison.

Definition at line 593 of file dev_iterators.h.

## operator*()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

reference utl::indev_it< cont_t, iter_t, _beg, _size >::operator* | ( |  | ) |

inline

De-reference operator. No end() place dereference check is made.

Definition at line 537 of file dev_iterators.h.

## operator+()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t utl::indev_it< cont_t, iter_t, _beg, _size >::operator+ | ( | difference_type | n | ) |

inline

Definition at line 580 of file dev_iterators.h.

## operator++() [1/2]

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t& utl::indev_it< cont_t, iter_t, _beg, _size >::operator++ | ( |  | ) |

inline

Pre increment.

Definition at line 548 of file dev_iterators.h.

## operator++() [2/2]

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t utl::indev_it< cont_t, iter_t, _beg, _size >::operator++ | ( | int |  | ) |

inline

Post increment.

Definition at line 553 of file dev_iterators.h.

## operator+=()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t& utl::indev_it< cont_t, iter_t, _beg, _size >::operator+= | ( | difference_type | n | ) |

inline

Definition at line 576 of file dev_iterators.h.

## operator-()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t utl::indev_it< cont_t, iter_t, _beg, _size >::operator- | ( | difference_type | n | ) |

inline

Definition at line 587 of file dev_iterators.h.

## operator--() [1/2]

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t& utl::indev_it< cont_t, iter_t, _beg, _size >::operator-- | ( |  | ) |

inline

Pre decrement.

Definition at line 560 of file dev_iterators.h.

## operator--() [2/2]

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t utl::indev_it< cont_t, iter_t, _beg, _size >::operator-- | ( | int |  | ) |

inline

Post decrement.

Definition at line 565 of file dev_iterators.h.

## operator-=()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t& utl::indev_it< cont_t, iter_t, _beg, _size >::operator-= | ( | difference_type | n | ) |

inline

Definition at line 583 of file dev_iterators.h.

## operator->()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

pointer utl::indev_it< cont_t, iter_t, _beg, _size >::operator-> | ( |  | ) |

inline

Arrow operator. No end() place dereference check is made.

Definition at line 542 of file dev_iterators.h.

## operator=()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

iterator_t& utl::indev_it< cont_t, iter_t, _beg, _size >::operator= | ( | const iterator_t & | it | ) |

inlinenoexcept

Basic copy assignment operator.

Definition at line 515 of file dev_iterators.h.

## operator[]()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

reference utl::indev_it< cont_t, iter_t, _beg, _size >::operator[] | ( | difference_type | n | ) |

inline

[] operator. Is a combination of input method and dereference

Definition at line 571 of file dev_iterators.h.

## owner()

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

const cont_t* utl::indev_it< cont_t, iter_t, _beg, _size >::owner | ( |  | ) | const

inlinenoexcept

Export container for comparison.

Definition at line 591 of file dev_iterators.h.

## Member Data Documentation

## cursor_

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

index_t utl::indev_it< cont_t, iter_t, _beg, _size >::cursor_ {eod}

private

virtual cursor for comparison operators

Definition at line 488 of file dev_iterators.h.

## owner_

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

cont_t* utl::indev_it< cont_t, iter_t, _beg, _size >::owner_ {nullptr}

private

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

Definition at line 483 of file dev_iterators.h.

## value_

template<typename cont_t, typename iter_t, index_t _beg = 0, size_t _size = static_cast<size_t>(-1)-_beg>

value_type utl::indev_it< cont_t, iter_t, _beg, _size >::value_ {}

private

The current value, used as cache.

Definition at line 489 of file dev_iterators.h.

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

- include/utl/dev/dev_iterators.h