oln::window2d Class Reference

Window 2 dimensions. More...

#include <window2d.hh>

Inheritance diagram for oln::window2d:

Inheritance graph
[legend]
Collaboration diagram for oln::window2d:

Collaboration graph
[legend]
List of all members.

Public Types

typedef abstract::windownd<
window2d
super_type
 The super type.
typedef window2d self_type
 The self type.
typedef struct_elt_traits<
self_type >::iter_type 
iter_type
 The associate image's type of iterator.
typedef struct_elt_traits<
self_type >::neighb_type 
neighb_type
 Type of neighbor.
typedef struct_elt_traits<
self_type >::dpoint_type 
dpoint_type
 The associate image's type of dpoint (move point).

Public Member Functions

window2dadd (const dpoint_type &dp)
 Add a dpoint (move point) to the window.
window2dadd (coord row, coord col)
 Add a point by coordinates to the window.
 window2d ()
 Construct a window of 2 dimensions.
 window2d (unsigned size)
 Construct a window of 2 dimensions.
 window2d (unsigned n, const coord crd[])
 Construct a window of 2 dimensions from several points.
 window2d (const io::internal::anything &r)

Static Public Member Functions

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

Protected Member Functions

coord delta_update_ (const dpoint_type &dp)
 Update delta.

Friends

class abstract::window_base< abstract::window< window2d >, window2d >

Detailed Description

Window 2 dimensions.

A window is a set of points. This class defines how to deal with. These points have 2 dimension.

Definition at line 64 of file window2d.hh.


Member Typedef Documentation

typedef struct_elt_traits< self_type >::iter_type oln::window2d::iter_type

The associate image's type of iterator.

Warning:
Prefer the macros oln_iter_type(Iterable) and oln_iter_type_(Iterable) (the same without the 'typename' keyword)

Definition at line 78 of file window2d.hh.

typedef struct_elt_traits< self_type >::dpoint_type oln::window2d::dpoint_type

The associate image's type of dpoint (move point).

Warning:
Prefer the macros oln_dpoint_type(Pointable) and oln_dpoint_type_(Pointable) (the same without the 'typename' keyword)

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

Definition at line 88 of file window2d.hh.


Constructor & Destructor Documentation

oln::window2d::window2d ( unsigned  size  )  [inline]

Construct a window of 2 dimensions.

Definition at line 131 of file window2d.hh.

00131                             : super_type(size)
00132     {}

oln::window2d::window2d ( unsigned  n,
const coord  crd[] 
) [inline]

Construct a window of 2 dimensions from several points.

Definition at line 139 of file window2d.hh.

References add().

00139                                             : super_type(n)
00140     {
00141       for (unsigned i = 0; i < 2 * n; i += 2)
00142         add(dpoint_type(crd[i], crd[i+1]));
00143     }


Member Function Documentation

window2d& oln::window2d::add ( const dpoint_type dp  )  [inline]

Add a dpoint (move point) to the window.

Add a new member to the window. This point must be of 2 dimensions.

Definition at line 100 of file window2d.hh.

References oln::abstract::windownd< Exact >::add_().

Referenced by add(), oln::topo::tarjan::obsolete::flat_zone< I >::doit(), oln::mk_win_ellipse(), oln::mk_win_rectangle(), oln::io::internal::read(), and window2d().

00101     {
00102       return this->exact().add_(dp);
00103     }

window2d& oln::window2d::add ( coord  row,
coord  col 
) [inline]

Add a point by coordinates to the window.

Add a new member by its coordinates to the window. The coordinates are the row number and the column number because the window has 2 dimensions.

Definition at line 115 of file window2d.hh.

References add().

00116     {
00117       dpoint_type dp(row, col);
00118       return add(dp);
00119     }

coord oln::window2d::delta_update_ ( const dpoint_type dp  )  [inline, protected]

Update delta.

Definition at line 169 of file window2d.hh.

References oln::abstract::window_base< Sup, Exact >::delta_.

00170     {
00171       delta_(abs(dp.row()));
00172       delta_(abs(dp.col()));
00173       return delta_;
00174     }


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