DGtal
1.5.beta
|
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 std::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 86 of file ConstRangeFromPointAdapter.h.
typedef ConstIteratorAdapter<typename TRange::ConstIterator,TFunctor,TReturnType> DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::ConstIterator |
Definition at line 95 of file ConstRangeFromPointAdapter.h.
typedef std::reverse_iterator<ConstIterator> DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::ConstReverseIterator |
Definition at line 96 of file ConstRangeFromPointAdapter.h.
typedef TRange::Point DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::Point |
Definition at line 94 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 106 of file ConstRangeFromPointAdapter.h.
|
inline |
Copy constructor.
other | the iterator to clone. |
Definition at line 114 of file ConstRangeFromPointAdapter.h.
|
inline |
|
inline |
Iterator service.
Definition at line 162 of file ConstRangeFromPointAdapter.h.
References DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myFunctorPtr, and DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myRangePtr.
Referenced by DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::rend().
|
inline |
Iterator service.
Definition at line 170 of file ConstRangeFromPointAdapter.h.
References aPoint(), DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myFunctorPtr, and DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myRangePtr.
|
private |
|
inline |
Iterator service.
Definition at line 178 of file ConstRangeFromPointAdapter.h.
References DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myFunctorPtr, and DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myRangePtr.
Referenced by DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::rbegin().
|
inline |
Checks the validity/consistency of the object.
Definition at line 141 of file ConstRangeFromPointAdapter.h.
|
inline |
Assignment.
other | the iterator to copy. |
Definition at line 122 of file ConstRangeFromPointAdapter.h.
References DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myFunctorPtr, and DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myRangePtr.
|
inline |
Iterator service.
Definition at line 186 of file ConstRangeFromPointAdapter.h.
References DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::end().
|
inline |
Iterator service.
Definition at line 194 of file ConstRangeFromPointAdapter.h.
References aPoint(), DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::end(), DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myFunctorPtr, and DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::myRangePtr.
|
inline |
Iterator service.
Definition at line 204 of file ConstRangeFromPointAdapter.h.
References DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::begin().
|
private |
Aliasing pointer on the underlying functor
Definition at line 153 of file ConstRangeFromPointAdapter.h.
Referenced by DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::begin(), DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::end(), DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::operator=(), and DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::rbegin().
|
private |
Aliasing pointer on the range
Definition at line 149 of file ConstRangeFromPointAdapter.h.
Referenced by DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::begin(), DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::end(), DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::operator=(), and DGtal::ConstRangeFromPointAdapter< TRange, TFunctor, TReturnType >::rbegin().