oln::bkd_iter2d< Exact > Class Template Reference

#include <bkd_iter2d.hh>

Inheritance diagram for oln::bkd_iter2d< Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::bkd_iter2d< Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { dim = iter_traits<exact_type>::dim }
typedef mlc::exact_vt< bkd_iter2d<
Exact >, Exact >::ret 
exact_type
 The exact type.
typedef abstract::iter2d<
exact_type
super_type
 The super type.
typedef abstract::iter< exact_typesuper_iter_type
 The super iterator type.
typedef iter_traits< exact_type
>::point_type 
point_type
 The associate image's type of point.

Public Member Functions

template<class Image>
 bkd_iter2d (const Image &ima)
 Construct a backward iterator (2 dimension).
template<class U>
operator= (U u)
 Set current iterator's point.

Static Public Member Functions

static std::string name ()
 Return the name of the type.

Protected Member Functions

void goto_begin_ ()
 Set current point to the first iterator's point.
void goto_end_ ()
 Set current point to the last iterator's point.
bool is_at_end_ () const
 Test if iterator's current point is the last one.
void goto_next_ ()
 Go to the next iterator's point.

Friends

class abstract::iter< exact_type >
class abstract::iter2d< exact_type >

Detailed Description

template<class Exact>
class oln::bkd_iter2d< Exact >

Backward Iterator on image 2 dimension

Allow iterable object (like image, window, ...) of 2 dimensions backward traversing.

See also:
iter

Definition at line 58 of file bkd_iter2d.hh.


Member Typedef Documentation

template<class Exact>
typedef iter_traits<exact_type>::point_type oln::bkd_iter2d< Exact >::point_type

The associate image's type of point.

Warning:
Prefer the macros oln_point_type(Pointable) and oln_point_type_(Pointable) (the same without the 'typename' keyword)

Reimplemented from oln::abstract::iter< Exact >.

Definition at line 76 of file bkd_iter2d.hh.


Constructor & Destructor Documentation

template<class Exact>
template<class Image>
oln::bkd_iter2d< Exact >::bkd_iter2d ( const Image &  ima  )  [inline]

Construct a backward iterator (2 dimension).

Definition at line 86 of file bkd_iter2d.hh.

00086                                  :
00087       super_type(ima.size())
00088     {}


Member Function Documentation

template<class Exact>
template<class U>
U oln::bkd_iter2d< Exact >::operator= ( u  )  [inline]

Set current iterator's point.

Definition at line 96 of file bkd_iter2d.hh.

References oln::abstract::iter< Exact >::operator=().

00097     {
00098       return super_iter_type::operator=(u);
00099     }

template<class Exact>
void oln::bkd_iter2d< Exact >::goto_begin_ (  )  [inline, protected]

Set current point to the first iterator's point.

Set current point of iterator to the first iterator's point.

Definition at line 116 of file bkd_iter2d.hh.

References oln::abstract::iter2d< Exact >::ncols_, oln::abstract::iter2d< Exact >::nrows_, and oln::abstract::iter< Exact >::p_.

00117     {
00118       this->p_.row() = this->nrows_ - 1;
00119       this->p_.col() = this->ncols_ - 1;
00120     }

template<class Exact>
void oln::bkd_iter2d< Exact >::goto_end_ (  )  [inline, protected]

Set current point to the last iterator's point.

Set current point of iterator to the last iterator's point.

Definition at line 128 of file bkd_iter2d.hh.

References oln::abstract::iter< Exact >::p_.

00129     {
00130       this->p_.row() = -1;
00131     }

template<class Exact>
bool oln::bkd_iter2d< Exact >::is_at_end_ (  )  const [inline, protected]

Test if iterator's current point is the last one.

Returns:
True if current point is the last one.

Definition at line 138 of file bkd_iter2d.hh.

References oln::abstract::iter< Exact >::p_.

00139     {
00140       return this->p_.row() == -1;
00141     }


The documentation for this class was generated from the following file:
Generated on Tue Feb 20 20:24:00 2007 for Olena by  doxygen 1.5.1