Claw  1.7.0
Public Types | Public Member Functions | Friends
claw::graphic::image::base_iterator< Image, Pixel > Class Template Reference

Base class for iterators on an image. More...

#include <image.hpp>

List of all members.

Public Types

typedef pixel_type value_type
typedef pixel_type & reference
typedef pixel_type * pointer
typedef ptrdiff_t difference_type
typedef
std::random_access_iterator_tag 
iterator_category

Public Member Functions

 base_iterator ()
 Constructor.
 base_iterator (image_type &owner, unsigned int x=0, unsigned int y=0)
 Constructor, from an image.
bool operator== (const self_type &that) const
 Tell if two iterator point to the same address.
bool operator!= (const self_type &that) const
 Tell if two iterator points to different addresses.
bool operator< (const self_type &that) const
 Tell if the current iterator is before an other.
bool operator> (const self_type &that) const
 Tell if the current iterator is after an other.
bool operator<= (const self_type &that) const
 Tell if the current iterator is before an other, or on the same address.
bool operator>= (const self_type &that) const
 Tell if the current iterator is after an other, or on the same address.
self_typeoperator+= (int n)
 Move the iterator.
self_typeoperator-= (int n)
 Move the iterator.
self_type operator+ (int n) const
 Get an iterator at a specific distance of the current iterator.
self_type operator- (int n) const
 Get an iterator at a specific distance of the current iterator.
difference_type operator- (const self_type &that) const
 Get the distance between two iterators.
self_typeoperator++ ()
 Preincrement.
self_type operator++ (int)
 Postincrement.
self_typeoperator-- ()
 Predecrement.
self_type operator-- (int)
 Postdecrement.
reference operator* () const
 Get a reference on the pointed pixel.
pointer operator-> () const
 Get a pointer on the pointed pixel.
reference operator[] (int n) const
 Get a pixel, using the iterator like an array.

Friends

template<typename ImageT , typename PixelT >
self_type operator+ (int n, const self_type &self)

Detailed Description

template<typename Image, typename Pixel>
class claw::graphic::image::base_iterator< Image, Pixel >

Base class for iterators on an image.

Author:
Julien Jorge.

Definition at line 105 of file image.hpp.


Constructor & Destructor Documentation

template<typename Image , typename Pixel >
claw::graphic::image::base_iterator< Image, Pixel >::base_iterator ( image_type &  owner,
unsigned int  x = 0,
unsigned int  y = 0 
)
inline

Constructor, from an image.

Parameters:
ownerThe image we will iterate through.
xX-coordinate of the pointed pixel.
yY-coordinate of the pointed pixel.

Definition at line 77 of file image.ipp.


Member Function Documentation

template<typename Image , typename Pixel >
bool claw::graphic::image::base_iterator< Image, Pixel >::operator!= ( const self_type that) const
inline

Tell if two iterator points to different addresses.

Parameters:
thatThe other operand.

Definition at line 109 of file image.ipp.

template<typename Image , typename Pixel >
claw::graphic::image::base_iterator< Image, Pixel >::self_type claw::graphic::image::base_iterator< Image, Pixel >::operator+ ( int  n) const
inline

Get an iterator at a specific distance of the current iterator.

Parameters:
nThe distance of the wanted iterator.

Definition at line 231 of file image.ipp.

template<typename Image , typename Pixel >
claw::graphic::image::base_iterator< Image, Pixel >::self_type & claw::graphic::image::base_iterator< Image, Pixel >::operator+= ( int  n)
inline

Move the iterator.

Parameters:
nNumber of steps of the move.

Definition at line 178 of file image.ipp.

References CLAW_PRECOND.

template<typename Image , typename Pixel >
claw::graphic::image::base_iterator< Image, Pixel >::self_type claw::graphic::image::base_iterator< Image, Pixel >::operator- ( int  n) const
inline

Get an iterator at a specific distance of the current iterator.

Parameters:
nThe distance of the wanted iterator.

Definition at line 245 of file image.ipp.

template<typename Image , typename Pixel >
claw::graphic::image::base_iterator< Image, Pixel >::difference_type claw::graphic::image::base_iterator< Image, Pixel >::operator- ( const self_type that) const
inline

Get the distance between two iterators.

Parameters:
thatThe other operand.

Definition at line 277 of file image.ipp.

References CLAW_PRECOND.

template<typename Image , typename Pixel >
claw::graphic::image::base_iterator< Image, Pixel >::self_type & claw::graphic::image::base_iterator< Image, Pixel >::operator-= ( int  n)
inline

Move the iterator.

Parameters:
nNumber of steps of the move.

Definition at line 203 of file image.ipp.

References CLAW_PRECOND.

template<typename Image , typename Pixel >
bool claw::graphic::image::base_iterator< Image, Pixel >::operator< ( const self_type that) const
inline

Tell if the current iterator is before an other.

Parameters:
thatThe other operand.

Definition at line 122 of file image.ipp.

References claw::math::coordinate_2d< T >::x.

template<typename Image , typename Pixel >
bool claw::graphic::image::base_iterator< Image, Pixel >::operator<= ( const self_type that) const
inline

Tell if the current iterator is before an other, or on the same address.

Parameters:
thatThe other operand.

Definition at line 152 of file image.ipp.

template<typename Image , typename Pixel >
bool claw::graphic::image::base_iterator< Image, Pixel >::operator== ( const self_type that) const
inline

Tell if two iterator point to the same address.

Parameters:
thatThe other operand.

Definition at line 91 of file image.ipp.

template<typename Image , typename Pixel >
bool claw::graphic::image::base_iterator< Image, Pixel >::operator> ( const self_type that) const
inline

Tell if the current iterator is after an other.

Parameters:
thatThe other operand.

Definition at line 138 of file image.ipp.

template<typename Image , typename Pixel >
bool claw::graphic::image::base_iterator< Image, Pixel >::operator>= ( const self_type that) const
inline

Tell if the current iterator is after an other, or on the same address.

Parameters:
thatThe other operand.

Definition at line 166 of file image.ipp.

template<typename Image , typename Pixel >
claw::graphic::image::base_iterator< Image, Pixel >::reference claw::graphic::image::base_iterator< Image, Pixel >::operator[] ( int  n) const
inline

Get a pixel, using the iterator like an array.

Parameters:
nIndex of the cell from which we want the pixel.

Definition at line 398 of file image.ipp.


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