|
DGtal 2.0.0
|
Aim: model of CConstBidirectionalRangeFromPoint that adapts any bidirectional range and provides services to iterate over it (in a read-only manner). More...
#include <DGtal/base/ConstRangeFromPointAdapter.h>
Public Types | |
| typedef TRange::Point | Point |
| typedef ConstIteratorAdapter< typename TRange::ConstIterator, TFunctor, TReturnType > | ConstIterator |
| typedef boost::reverse_iterator< ConstIterator > | ConstReverseIterator |
Public Member Functions | |
| ConstRangeFromPointAdapter (ConstAlias< TRange > aRange, ConstAlias< TFunctor > aFunctor) | |
| ConstRangeFromPointAdapter (const ConstRangeFromPointAdapter &other) | |
| ConstRangeFromPointAdapter & | operator= (const ConstRangeFromPointAdapter &other) |
| ~ConstRangeFromPointAdapter () | |
| bool | isValid () const |
| ConstIterator | begin () const |
| ConstIterator | begin (const Point &aPoint) const |
| ConstIterator | end () const |
| ConstReverseIterator | rbegin () const |
| ConstReverseIterator | rbegin (const Point &aPoint) const |
| ConstReverseIterator | rend () const |
Private Member Functions | |
| BOOST_CONCEPT_ASSERT ((CConstBidirectionalRangeFromPoint< TRange >)) | |
Private Attributes | |
| const TRange * | myRangePtr |
| const TFunctor * | myFunctorPtr |
Aim: model of CConstBidirectionalRangeFromPoint that adapts any bidirectional range and provides services to iterate over it (in a read-only manner).
| TRange | a model of CConstBidirectionalRangeFromPoint |
Moreover, the provided iterators are adapted with a functor f given at construction so that operator* calls f(*it), instead of calling directly operator* of the iterator it.
| TFunctor | the type of functor that transforms the pointed element into another one |
| TReturnType | the type of the element returned by the underlying functor. |
NB: the underlying range and functor are stored as aliasing pointers in order to avoid copies. As a consequence the pointed object must exist and must not be deleted during the use of any instance of this class.
Definition at line 87 of file ConstRangeFromPointAdapter.h.
| typedef ConstIteratorAdapter<typename TRange::ConstIterator,TFunctor,TReturnType> DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::ConstIterator |
Definition at line 96 of file ConstRangeFromPointAdapter.h.
| typedef boost::reverse_iterator<ConstIterator> DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::ConstReverseIterator |
Definition at line 97 of file ConstRangeFromPointAdapter.h.
| typedef TRange::Point DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::Point |
Definition at line 95 of file ConstRangeFromPointAdapter.h.
|
inline |
Standard constructor from one range and one functor.
| aRange | the range to adapt. |
| aFunctor | functor used to adapt on-the-fly the elements of the range |
Definition at line 107 of file ConstRangeFromPointAdapter.h.
References myFunctorPtr, and myRangePtr.
Referenced by ConstRangeFromPointAdapter(), and operator=().
|
inline |
Copy constructor.
| other | the iterator to clone. |
Definition at line 115 of file ConstRangeFromPointAdapter.h.
References ConstRangeFromPointAdapter(), myFunctorPtr, and myRangePtr.
|
inline |
|
inline |
Iterator service.
Definition at line 163 of file ConstRangeFromPointAdapter.h.
References myFunctorPtr, and myRangePtr.
Referenced by rend().
|
inline |
Iterator service.
Definition at line 171 of file ConstRangeFromPointAdapter.h.
References aPoint, myFunctorPtr, and myRangePtr.
|
private |
|
inline |
Iterator service.
Definition at line 179 of file ConstRangeFromPointAdapter.h.
References myFunctorPtr, and myRangePtr.
|
inline |
Checks the validity/consistency of the object.
Definition at line 142 of file ConstRangeFromPointAdapter.h.
|
inline |
Assignment.
| other | the iterator to copy. |
Definition at line 123 of file ConstRangeFromPointAdapter.h.
References ConstRangeFromPointAdapter(), myFunctorPtr, and myRangePtr.
|
inline |
Iterator service.
Definition at line 187 of file ConstRangeFromPointAdapter.h.
References end().
|
inline |
Iterator service.
Definition at line 195 of file ConstRangeFromPointAdapter.h.
References aPoint, end(), myFunctorPtr, and myRangePtr.
|
inline |
Iterator service.
Definition at line 205 of file ConstRangeFromPointAdapter.h.
References begin().
|
private |
Aliasing pointer on the underlying functor
Definition at line 154 of file ConstRangeFromPointAdapter.h.
Referenced by begin(), begin(), ConstRangeFromPointAdapter(), ConstRangeFromPointAdapter(), end(), operator=(), and rbegin().
|
private |
Aliasing pointer on the range
Definition at line 150 of file ConstRangeFromPointAdapter.h.
Referenced by begin(), begin(), ConstRangeFromPointAdapter(), ConstRangeFromPointAdapter(), end(), operator=(), and rbegin().