uTL
micro Template library
|
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 | |||
| |||
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)
| |||
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... | |
Input device iterator type. We "future call" interface methods from owner class to provide iterator functionality.
Value meta-programming function for SPI interface checking
_Tp | Type to check |
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.
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.
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.
|
private |
< iterator type local name
Definition at line 463 of file dev_iterators.h.
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.
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.
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.
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.
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.
|
inlinenoexcept |
Default constructor.
Definition at line 500 of file dev_iterators.h.
|
inlineexplicitnoexcept |
Basic constructor.
Definition at line 505 of file dev_iterators.h.
|
inlineexplicitnoexcept |
Basic copy constructor.
Definition at line 510 of file dev_iterators.h.
|
inlinenoexcept |
Export cursor for comparison.
Definition at line 593 of file dev_iterators.h.
|
inline |
De-reference operator. No end() place dereference check is made.
Definition at line 537 of file dev_iterators.h.
|
inline |
Definition at line 580 of file dev_iterators.h.
|
inline |
Pre increment.
Definition at line 548 of file dev_iterators.h.
|
inline |
Post increment.
Definition at line 553 of file dev_iterators.h.
|
inline |
Definition at line 576 of file dev_iterators.h.
|
inline |
Definition at line 587 of file dev_iterators.h.
|
inline |
Pre decrement.
Definition at line 560 of file dev_iterators.h.
|
inline |
Post decrement.
Definition at line 565 of file dev_iterators.h.
|
inline |
Definition at line 583 of file dev_iterators.h.
|
inline |
Arrow operator. No end() place dereference check is made.
Definition at line 542 of file dev_iterators.h.
|
inlinenoexcept |
Basic copy assignment operator.
Definition at line 515 of file dev_iterators.h.
|
inline |
[] operator. Is a combination of input method and dereference
Definition at line 571 of file dev_iterators.h.
|
inlinenoexcept |
Export container for comparison.
Definition at line 591 of file dev_iterators.h.
|
private |
virtual cursor for comparison operators
Definition at line 488 of file dev_iterators.h.
|
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.
|
private |
The current value, used as cache.
Definition at line 489 of file dev_iterators.h.