DGtal 2.0.0
|
Aim: model of output iterator, ie incrementable and writable iterator, which only stores in a variable the last assigned item. More...
#include <DGtal/base/OneItemOutputIterator.h>
Public Types | |
using | iterator_category = std::output_iterator_tag |
using | value_type = void |
using | difference_type = void |
using | pointer = void |
using | reference = void |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((boost::DefaultConstructible< T >)) | |
BOOST_CONCEPT_ASSERT ((boost::CopyConstructible< T >)) | |
BOOST_CONCEPT_ASSERT ((boost::Assignable< T >)) | |
OneItemOutputIterator () | |
OneItemOutputIterator (const OneItemOutputIterator &other) | |
OneItemOutputIterator & | operator= (const T &aItem) |
OneItemOutputIterator & | operator* () |
OneItemOutputIterator & | operator++ () |
OneItemOutputIterator | operator++ (int) |
T | get () const |
bool | isValid () const |
Private Attributes | |
T * | myItemPtr |
pointer that stores the last assigned item |
Aim: model of output iterator, ie incrementable and writable iterator, which only stores in a variable the last assigned item.
Description of template class 'OneItemOutputIterator'
T | at least a default constructible, copy constuctible and assignable type. |
Definition at line 59 of file OneItemOutputIterator.h.
using DGtal::OneItemOutputIterator< T >::difference_type = void |
Definition at line 65 of file OneItemOutputIterator.h.
using DGtal::OneItemOutputIterator< T >::iterator_category = std::output_iterator_tag |
Definition at line 63 of file OneItemOutputIterator.h.
using DGtal::OneItemOutputIterator< T >::pointer = void |
Definition at line 66 of file OneItemOutputIterator.h.
using DGtal::OneItemOutputIterator< T >::reference = void |
Definition at line 67 of file OneItemOutputIterator.h.
using DGtal::OneItemOutputIterator< T >::value_type = void |
Definition at line 64 of file OneItemOutputIterator.h.
|
inline |
Default constructor.
Definition at line 80 of file OneItemOutputIterator.h.
References myItemPtr.
Referenced by OneItemOutputIterator(), operator*(), operator++(), operator++(), and operator=().
|
inline |
Copy constructor.
Definition at line 87 of file OneItemOutputIterator.h.
References myItemPtr, and OneItemOutputIterator().
DGtal::OneItemOutputIterator< T >::BOOST_CONCEPT_ASSERT | ( | (boost::Assignable< T >) | ) |
DGtal::OneItemOutputIterator< T >::BOOST_CONCEPT_ASSERT | ( | (boost::CopyConstructible< T >) | ) |
DGtal::OneItemOutputIterator< T >::BOOST_CONCEPT_ASSERT | ( | (boost::DefaultConstructible< T >) | ) |
|
inline |
Accessor to the last assigned item.
Definition at line 126 of file OneItemOutputIterator.h.
|
inline |
Checks the validity/consistency of the object.
Definition at line 136 of file OneItemOutputIterator.h.
References myItemPtr.
Referenced by get(), and operator=().
|
inline |
Dereference operator
Definition at line 108 of file OneItemOutputIterator.h.
References OneItemOutputIterator().
|
inline |
Pre-increment operator
Definition at line 114 of file OneItemOutputIterator.h.
References OneItemOutputIterator().
|
inline |
Post-increment operator
Definition at line 120 of file OneItemOutputIterator.h.
References OneItemOutputIterator().
|
inline |
Assignment
aItem | any item |
Definition at line 97 of file OneItemOutputIterator.h.
References isValid(), myItemPtr, and OneItemOutputIterator().
|
private |
pointer that stores the last assigned item
Definition at line 141 of file OneItemOutputIterator.h.
Referenced by get(), isValid(), OneItemOutputIterator(), OneItemOutputIterator(), and operator=().