DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage > Class Template Reference

Aim: model of CBidirectionalRangeFromPoint that adapts a TiledImage range of elements bounded by two iterators [itb, ite) and provides services to (circularly)iterate over it. More...

#include <DGtal/base/TiledImageBidirectionalRangeFromPoint.h>

Public Types

typedef TTiledImage TiledImage
 
typedef TiledImage::Point Point
 
typedef TiledImage::OutputIterator Iterator
 
typedef TiledImage::ConstIterator ConstIterator
 
typedef std::reverse_iterator< IteratorReverseIterator
 
typedef std::reverse_iterator< ConstIteratorConstReverseIterator
 
typedef TiledImage::OutputIterator OutputIterator
 
typedef std::reverse_iterator< IteratorReverseOutputIterator
 

Public Member Functions

 TiledImageBidirectionalRangeFromPoint (const TiledImage *ti)
 
 TiledImageBidirectionalRangeFromPoint (const TiledImageBidirectionalRangeFromPoint &other)
 
TiledImageBidirectionalRangeFromPointoperator= (const TiledImageBidirectionalRangeFromPoint &other)
 
 ~TiledImageBidirectionalRangeFromPoint ()
 
bool isValid () const
 
void selfDisplay (std::ostream &out) const
 
std::string className () const
 
Iterator begin ()
 
Iterator begin (const Point &aPoint)
 
ConstIterator begin () const
 
ConstIterator begin (const Point &aPoint) const
 
Iterator end ()
 
ConstIterator end () const
 
OutputIterator outputIterator ()
 
OutputIterator outputIterator (const Point &aPoint)
 
ReverseOutputIterator routputIterator ()
 
ReverseOutputIterator routputIterator (const Point &aPoint)
 
ReverseIterator rbegin ()
 
ReverseIterator rbegin (const Point &aPoint)
 
ReverseIterator rend ()
 
ConstReverseIterator rbegin () const
 
ConstReverseIterator rbegin (const Point &aPoint) const
 
ConstReverseIterator rend () const
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((boost::BidirectionalIterator< typename TTiledImage::OutputIterator >))
 
 BOOST_CONCEPT_ASSERT ((boost::BidirectionalIterator< typename TTiledImage::ConstIterator >))
 

Private Attributes

const TTiledImage * myti
 

Detailed Description

template<typename TTiledImage>
class DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >

Aim: model of CBidirectionalRangeFromPoint that adapts a TiledImage range of elements bounded by two iterators [itb, ite) and provides services to (circularly)iterate over it.

Template Parameters
TTiledImagethe type of the TiledImage with his const iterator to adapt (at least bidirectional)
See also
RangeAdapter

Definition at line 71 of file TiledImageBidirectionalRangeFromPoint.h.

Member Typedef Documentation

◆ ConstIterator

template<typename TTiledImage >
typedef TiledImage::ConstIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::ConstIterator

Definition at line 86 of file TiledImageBidirectionalRangeFromPoint.h.

◆ ConstReverseIterator

template<typename TTiledImage >
typedef std::reverse_iterator<ConstIterator> DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::ConstReverseIterator

Definition at line 89 of file TiledImageBidirectionalRangeFromPoint.h.

◆ Iterator

template<typename TTiledImage >
typedef TiledImage::OutputIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::Iterator

Definition at line 85 of file TiledImageBidirectionalRangeFromPoint.h.

◆ OutputIterator

template<typename TTiledImage >
typedef TiledImage::OutputIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::OutputIterator

Definition at line 91 of file TiledImageBidirectionalRangeFromPoint.h.

◆ Point

template<typename TTiledImage >
typedef TiledImage::Point DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::Point

Definition at line 83 of file TiledImageBidirectionalRangeFromPoint.h.

◆ ReverseIterator

template<typename TTiledImage >
typedef std::reverse_iterator<Iterator> DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::ReverseIterator

Definition at line 88 of file TiledImageBidirectionalRangeFromPoint.h.

◆ ReverseOutputIterator

template<typename TTiledImage >
typedef std::reverse_iterator<Iterator> DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::ReverseOutputIterator

Definition at line 92 of file TiledImageBidirectionalRangeFromPoint.h.

◆ TiledImage

template<typename TTiledImage >
typedef TTiledImage DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::TiledImage

Definition at line 81 of file TiledImageBidirectionalRangeFromPoint.h.

Constructor & Destructor Documentation

◆ TiledImageBidirectionalRangeFromPoint() [1/2]

template<typename TTiledImage >
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::TiledImageBidirectionalRangeFromPoint ( const TiledImage * ti)
inline

Standard constructor from a TiledImage.

Parameters
tipointer on a TiledImage.

Definition at line 103 of file TiledImageBidirectionalRangeFromPoint.h.

◆ TiledImageBidirectionalRangeFromPoint() [2/2]

template<typename TTiledImage >
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::TiledImageBidirectionalRangeFromPoint ( const TiledImageBidirectionalRangeFromPoint< TTiledImage > & other)
inline

Copy constructor.

Parameters
otherthe iterator to clone.

Definition at line 110 of file TiledImageBidirectionalRangeFromPoint.h.

111 : myti ( other.myti ) {}

◆ ~TiledImageBidirectionalRangeFromPoint()

template<typename TTiledImage >
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::~TiledImageBidirectionalRangeFromPoint ( )
inline

Destructor. Does nothing.

Definition at line 131 of file TiledImageBidirectionalRangeFromPoint.h.

131{}

Member Function Documentation

◆ begin() [1/4]

◆ begin() [2/4]

template<typename TTiledImage >
ConstIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::begin ( ) const
inline

Iterator service.

Returns
begin iterator

Definition at line 198 of file TiledImageBidirectionalRangeFromPoint.h.

199 {
200 return ConstIterator ( myti->begin() );
201 }

References DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ begin() [3/4]

template<typename TTiledImage >
Iterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::begin ( const Point & aPoint)
inline

Iterator service.

Parameters
aPointa Point
Returns
begin iterator at aPoint

Definition at line 189 of file TiledImageBidirectionalRangeFromPoint.h.

190 {
191 return Iterator ( myti->begin(aPoint) );
192 }
const Point aPoint(3, 4)

References aPoint(), and DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ begin() [4/4]

template<typename TTiledImage >
ConstIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::begin ( const Point & aPoint) const
inline

Iterator service.

Parameters
aPointa Point
Returns
begin iterator at aPoint

Definition at line 208 of file TiledImageBidirectionalRangeFromPoint.h.

209 {
210 return ConstIterator ( myti->begin(aPoint) );
211 }

References aPoint(), and DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TTiledImage >
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::BOOST_CONCEPT_ASSERT ( (boost::BidirectionalIterator< typename TTiledImage::ConstIterator >) )
private

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TTiledImage >
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::BOOST_CONCEPT_ASSERT ( (boost::BidirectionalIterator< typename TTiledImage::OutputIterator >) )
private

◆ className()

template<typename TTiledImage >
std::string DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::className ( ) const
inline
Returns
the style name used for drawing this object.

Definition at line 159 of file TiledImageBidirectionalRangeFromPoint.h.

160 {
161 return "TiledImageBidirectionalRangeFromPoint";
162 }

◆ end() [1/2]

template<typename TTiledImage >
Iterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::end ( )
inline

◆ end() [2/2]

template<typename TTiledImage >
ConstIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::end ( ) const
inline

Iterator service.

Returns
end iterator

Definition at line 226 of file TiledImageBidirectionalRangeFromPoint.h.

227 {
228 return ConstIterator ( myti->end() );
229 }

References DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ isValid()

template<typename TTiledImage >
bool DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::isValid ( ) const
inline

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

Definition at line 137 of file TiledImageBidirectionalRangeFromPoint.h.

138 {
139 return true;
140 }

◆ operator=()

template<typename TTiledImage >
TiledImageBidirectionalRangeFromPoint & DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::operator= ( const TiledImageBidirectionalRangeFromPoint< TTiledImage > & other)
inline

Assignment.

Parameters
otherthe iterator to copy.
Returns
a reference on 'this'.

Definition at line 118 of file TiledImageBidirectionalRangeFromPoint.h.

119 {
120 if ( this != &other )
121 {
122 myti = other.myti;
123 }
124
125 return *this;
126 }

References DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ outputIterator() [1/2]

template<typename TTiledImage >
OutputIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::outputIterator ( )
inline

OutputIterator service.

Returns
an output itertor on the first elements

Definition at line 235 of file TiledImageBidirectionalRangeFromPoint.h.

236 {
237 return OutputIterator ( myti->begin() );
238 }

References DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ outputIterator() [2/2]

template<typename TTiledImage >
OutputIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::outputIterator ( const Point & aPoint)
inline

OutputIterator service.

Parameters
aPointa point
Returns
an output itertor on the point

Definition at line 245 of file TiledImageBidirectionalRangeFromPoint.h.

246 {
247 return OutputIterator ( myti->begin(aPoint) );
248 }

References aPoint(), and DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ rbegin() [1/4]

template<typename TTiledImage >
ReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rbegin ( )
inline

◆ rbegin() [2/4]

template<typename TTiledImage >
ConstReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rbegin ( ) const
inline

Iterator service.

Returns
rbegin iterator

Definition at line 301 of file TiledImageBidirectionalRangeFromPoint.h.

302 {
303 return ConstReverseIterator ( this->end() );
304 }

References DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::end().

◆ rbegin() [3/4]

template<typename TTiledImage >
ReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rbegin ( const Point & aPoint)
inline

Iterator service.

Parameters
aPointa Point
Returns
rbegin iterator at aPoint

Definition at line 283 of file TiledImageBidirectionalRangeFromPoint.h.

284 {
285 return ReverseIterator ( myti->rbegin(aPoint) );
286 }

References aPoint(), and DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ rbegin() [4/4]

template<typename TTiledImage >
ConstReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rbegin ( const Point & aPoint) const
inline

Iterator service.

Parameters
aPointa Point
Returns
rbegin iterator at aPoint

Definition at line 311 of file TiledImageBidirectionalRangeFromPoint.h.

312 {
313 return ConstReverseIterator ( myti->rbegin(aPoint) );
314 }

References aPoint(), and DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ rend() [1/2]

template<typename TTiledImage >
ReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rend ( )
inline

◆ rend() [2/2]

template<typename TTiledImage >
ConstReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rend ( ) const
inline

Iterator service.

Returns
rend iterator

Definition at line 320 of file TiledImageBidirectionalRangeFromPoint.h.

321 {
322 return ConstReverseIterator ( this->begin() );
323 }

References DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::begin().

◆ routputIterator() [1/2]

template<typename TTiledImage >
ReverseOutputIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::routputIterator ( )
inline

ReverseOutputIterator service.

Returns
an output itertor on the first elements

Definition at line 254 of file TiledImageBidirectionalRangeFromPoint.h.

255 {
256 return ReverseOutputIterator ( myti->begin() );
257 }

References DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ routputIterator() [2/2]

template<typename TTiledImage >
ReverseOutputIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::routputIterator ( const Point & aPoint)
inline

ReverseOutputIterator service.

Parameters
aPointa point
Returns
an output itertor on the point

Definition at line 264 of file TiledImageBidirectionalRangeFromPoint.h.

265 {
266 return ReverseOutputIterator ( myti->begin(aPoint) );
267 }

References aPoint(), and DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

◆ selfDisplay()

template<typename TTiledImage >
void DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::selfDisplay ( std::ostream & out) const
inline

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Definition at line 147 of file TiledImageBidirectionalRangeFromPoint.h.

148 {
150 out << "[TiledImageBidirectionalRangeFromPoint]" << std::endl;
151 out << "\t";
152 std::copy ( myti->begin(), myti->end(), std::ostream_iterator<Value> ( out, ", " ) );
153 out << std::endl;
154 }

References DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti.

Field Documentation

◆ myti


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