oln::abstract::iter1d< Exact > Class Template Reference

Iterator on image of 1 dimension. More...

#include <iter1d.hh>

Inheritance diagram for oln::abstract::iter1d< Exact >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef iter< Exact > super_type
 The exact type of the object.


Public Member Functions

coord col () const
 Get the coordinates of iterator's current point.


Static Public Member Functions

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


Protected Member Functions

point1d to_point () const
 Get the current point viewed by the iterator.

 iter1d ()
 Constructor.

 iter1d (const image1d_size &size)
 Constructor
  • size The size of the image to iterate.



Protected Attributes

const coord ncols_
 The number of columns of the image you are iterating.


Friends

class iter< Exact >

Detailed Description

template<class Exact>
class oln::abstract::iter1d< Exact >

Iterator on image of 1 dimension.

Allow iterable object (like image, window, ...) of 1 dimension traversing.

See also:
iter

Definition at line 70 of file iter1d.hh.


Constructor & Destructor Documentation

template<class Exact>
oln::abstract::iter1d< Exact >::iter1d const image1d_size size  )  [inline, protected]
 

Constructor

  • size The size of the image to iterate.

Precondition:
size.ncols() > 0.
Construct an iterator (1d) on an image (1d).

Definition at line 128 of file iter1d.hh.

00128                                        :
00129         super_type(), ncols_(size.ncols())
00130       {
00131         precondition(size.ncols() > 0);
00132         this->exact().goto_begin_();
00133       }
    };


Member Function Documentation

template<class Exact>
coord oln::abstract::iter1d< Exact >::col  )  const [inline]
 

Get the coordinates of iterator's current point.

On this kind of image, all point are on the same line. So you are able to get the column number by this way (and never the line number).

Definition at line 86 of file iter1d.hh.

00087       {
00088         return this->p_.col();
00089       }

template<class Exact>
point1d oln::abstract::iter1d< Exact >::to_point  )  const [inline, protected]
 

Get the current point viewed by the iterator.

Returns:
The point (1 dimension) viewed by the iterator.
Precondition:
Instance != end.

Definition at line 107 of file iter1d.hh.

00108       {
00109         precondition(*this != end);
00110         invariant(this->p_.col() >= 0 &&
00111                   this->p_.col() < ncols_);
00112         return this->p_;
00113       }


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 20:15:08 2004 for Olena by doxygen 1.3.6-20040222