DGtal  0.9.3beta
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage > Class Template Reference

#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

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

Definition at line 86 of file TiledImageBidirectionalRangeFromPoint.h.

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

Definition at line 89 of file TiledImageBidirectionalRangeFromPoint.h.

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

Definition at line 85 of file TiledImageBidirectionalRangeFromPoint.h.

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

Definition at line 91 of file TiledImageBidirectionalRangeFromPoint.h.

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

Definition at line 83 of file TiledImageBidirectionalRangeFromPoint.h.

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

Definition at line 88 of file TiledImageBidirectionalRangeFromPoint.h.

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

Definition at line 92 of file TiledImageBidirectionalRangeFromPoint.h.

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

Definition at line 81 of file TiledImageBidirectionalRangeFromPoint.h.

Constructor & Destructor Documentation

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.

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 ) {}
template<typename TTiledImage >
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::~TiledImageBidirectionalRangeFromPoint ( )
inline

Destructor. Does nothing.

Definition at line 131 of file TiledImageBidirectionalRangeFromPoint.h.

131 {}

Member Function Documentation

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

Iterator service.

Returns
begin iterator

Definition at line 179 of file TiledImageBidirectionalRangeFromPoint.h.

Referenced by DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rend().

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  }
template<typename TTiledImage >
ConstIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::begin ( ) const
inline

Iterator service.

Returns
begin iterator

Definition at line 198 of file TiledImageBidirectionalRangeFromPoint.h.

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  }
template<typename TTiledImage >
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::BOOST_CONCEPT_ASSERT ( (boost::BidirectionalIterator< typename TTiledImage::OutputIterator >)  )
private
template<typename TTiledImage >
DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::BOOST_CONCEPT_ASSERT ( (boost::BidirectionalIterator< typename TTiledImage::ConstIterator >)  )
private
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  }
template<typename TTiledImage >
Iterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::end ( )
inline

Iterator service.

Returns
end iterator

Definition at line 217 of file TiledImageBidirectionalRangeFromPoint.h.

Referenced by DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rbegin().

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

Iterator service.

Returns
end iterator

Definition at line 226 of file TiledImageBidirectionalRangeFromPoint.h.

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  }
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.

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

119  {
120  if ( this != &other )
121  {
122  myti = other.myti;
123  }
124 
125  return *this;
126  }
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.

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  }
template<typename TTiledImage >
ReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rbegin ( )
inline

Iterator service.

Returns
rbegin iterator

Definition at line 273 of file TiledImageBidirectionalRangeFromPoint.h.

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

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  }
template<typename TTiledImage >
ConstReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rbegin ( ) const
inline

Iterator service.

Returns
rbegin iterator

Definition at line 301 of file TiledImageBidirectionalRangeFromPoint.h.

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

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  }
template<typename TTiledImage >
ReverseIterator DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::rend ( )
inline

Iterator service.

Returns
rend iterator

Definition at line 292 of file TiledImageBidirectionalRangeFromPoint.h.

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

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

Iterator service.

Returns
rend iterator

Definition at line 320 of file TiledImageBidirectionalRangeFromPoint.h.

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

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.

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  }
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.

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

148  {
149  typedef typename IteratorCirculatorTraits<Iterator>::Value Value;
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  }

Field Documentation

template<typename TTiledImage >
const TTiledImage* DGtal::TiledImageBidirectionalRangeFromPoint< TTiledImage >::myti
private

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