DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::TiledImageBidirectionalConstRangeFromPoint< TTiledImage > Class Template Reference

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

#include <DGtal/base/TiledImageBidirectionalConstRangeFromPoint.h>

Public Types

typedef TTiledImage TiledImage
 
typedef TiledImage::Point Point
 
typedef TiledImage::ConstIterator ConstIterator
 
typedef std::reverse_iterator< ConstIteratorConstReverseIterator
 
typedef Circulator< ConstIteratorConstCirculator
 
typedef std::reverse_iterator< ConstCirculatorConstReverseCirculator
 

Public Member Functions

 TiledImageBidirectionalConstRangeFromPoint (const TiledImage *ti)
 
 TiledImageBidirectionalConstRangeFromPoint (const TiledImageBidirectionalConstRangeFromPoint &other)
 
TiledImageBidirectionalConstRangeFromPointoperator= (const TiledImageBidirectionalConstRangeFromPoint &other)
 
 ~TiledImageBidirectionalConstRangeFromPoint ()
 
bool isValid () const
 
void selfDisplay (std::ostream &out) const
 
std::string className () 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
 
ConstCirculator c () const
 
ConstReverseCirculator rc () const
 

Private Member Functions

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

Private Attributes

const TTiledImage * myti
 

Detailed Description

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

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

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

Definition at line 71 of file TiledImageBidirectionalConstRangeFromPoint.h.

Member Typedef Documentation

◆ ConstCirculator

template<typename TTiledImage >
typedef Circulator<ConstIterator> DGtal::TiledImageBidirectionalConstRangeFromPoint< TTiledImage >::ConstCirculator

Definition at line 87 of file TiledImageBidirectionalConstRangeFromPoint.h.

◆ ConstIterator

Definition at line 84 of file TiledImageBidirectionalConstRangeFromPoint.h.

◆ ConstReverseCirculator

template<typename TTiledImage >
typedef std::reverse_iterator<ConstCirculator> DGtal::TiledImageBidirectionalConstRangeFromPoint< TTiledImage >::ConstReverseCirculator

Definition at line 88 of file TiledImageBidirectionalConstRangeFromPoint.h.

◆ ConstReverseIterator

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

Definition at line 85 of file TiledImageBidirectionalConstRangeFromPoint.h.

◆ Point

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

Definition at line 82 of file TiledImageBidirectionalConstRangeFromPoint.h.

◆ TiledImage

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

Definition at line 80 of file TiledImageBidirectionalConstRangeFromPoint.h.

Constructor & Destructor Documentation

◆ TiledImageBidirectionalConstRangeFromPoint() [1/2]

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

Standard constructor from a TiledImage.

Parameters
tipointer on a TiledImage.

Definition at line 96 of file TiledImageBidirectionalConstRangeFromPoint.h.

◆ TiledImageBidirectionalConstRangeFromPoint() [2/2]

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

Copy constructor.

Parameters
otherthe iterator to clone.

Definition at line 103 of file TiledImageBidirectionalConstRangeFromPoint.h.

104 : myti ( other.myti ) {}

◆ ~TiledImageBidirectionalConstRangeFromPoint()

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

Destructor. Does nothing.

Definition at line 124 of file TiledImageBidirectionalConstRangeFromPoint.h.

124{}

Member Function Documentation

◆ begin() [1/2]

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

◆ begin() [2/2]

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

Iterator service.

Returns
begin iterator

Definition at line 181 of file TiledImageBidirectionalConstRangeFromPoint.h.

182 {
183 return ConstIterator ( myti->begin(aPoint) );
184 }
const Point aPoint(3, 4)

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

◆ BOOST_CONCEPT_ASSERT()

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

◆ c()

template<typename TTiledImage >
ConstCirculator DGtal::TiledImageBidirectionalConstRangeFromPoint< TTiledImage >::c ( ) const
inline

◆ className()

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

Definition at line 152 of file TiledImageBidirectionalConstRangeFromPoint.h.

153 {
154 return "TiledImageBidirectionalConstRangeFromPoint";
155 }

◆ end()

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

◆ isValid()

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

Checks the validity/consistency of the object.

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

Definition at line 130 of file TiledImageBidirectionalConstRangeFromPoint.h.

131 {
132 return true;
133 }

◆ operator=()

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

Assignment.

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

Definition at line 111 of file TiledImageBidirectionalConstRangeFromPoint.h.

112 {
113 if ( this != &other )
114 {
115 myti = other.myti;
116 }
117
118 return *this;
119 }

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

◆ rbegin() [1/2]

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

Iterator service.

Returns
rbegin iterator

Definition at line 199 of file TiledImageBidirectionalConstRangeFromPoint.h.

200 {
201 return ConstReverseIterator ( this->end() );
202 }

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

◆ rbegin() [2/2]

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

Iterator service.

Returns
rbegin iterator

Definition at line 208 of file TiledImageBidirectionalConstRangeFromPoint.h.

209 {
210 return ConstReverseIterator ( myti->rbegin(aPoint) );
211 }

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

◆ rc()

template<typename TTiledImage >
ConstReverseCirculator DGtal::TiledImageBidirectionalConstRangeFromPoint< TTiledImage >::rc ( ) const
inline

◆ rend()

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

Iterator service.

Returns
rend iterator

Definition at line 217 of file TiledImageBidirectionalConstRangeFromPoint.h.

218 {
219 return ConstReverseIterator ( this->begin() );
220 }

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

◆ selfDisplay()

template<typename TTiledImage >
void DGtal::TiledImageBidirectionalConstRangeFromPoint< 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 140 of file TiledImageBidirectionalConstRangeFromPoint.h.

141 {
143 out << "[TiledImageBidirectionalConstRangeFromPoint]" << std::endl;
144 out << "\t";
145 std::copy ( myti->begin(), myti->end(), std::ostream_iterator<Value> ( out, ", " ) );
146 out << std::endl;
147 }

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

Field Documentation

◆ myti

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

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