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
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.
  • dp The new point.


window2dadd (coord row, coord col)
 Add a point by coordinates to the window.
  • row The coordinate (row) of the new point.
  • col The coordinate (col) of the new point.


 window2d ()
 Construct a window of 2 dimensions.

 window2d (unsigned size)
 Construct a window of 2 dimensions.
  • size The number of element.


 window2d (unsigned n, const coord crd[])
 Construct a window of 2 dimensions from several points.
  • n The number of element.
  • crd The coordinates of the elements.


 window2d (const io::internal::anything &r)

Static Public Member Functions

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


Protected Member Functions

coord delta_update_ (const dpoint_type &dp)
 Update delta.
  • dp a move point.



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 63 of file window2d.hh.


Member Typedef Documentation

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< window2d >.

Definition at line 88 of file window2d.hh.

Referenced by window2d().

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 77 of file window2d.hh.


Member Function Documentation

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

Add a point by coordinates to the window.

  • row The coordinate (row) of the new point.
  • col The coordinate (col) of the new point.

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(), oln::coord, and oln::abstract::struct_elt< window2d >::dp().

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

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

Add a dpoint (move point) to the window.

  • dp The new point.

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

Definition at line 100 of file window2d.hh.

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

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

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

Update delta.

  • dp a move point.

Returns:
Delta.
If the point is the biggest element of the window. then this point is assigned to delta.

Definition at line 169 of file window2d.hh.

References oln::abstract::window_base< window< window2d >, window2d >::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 Thu Apr 15 20:14:36 2004 for Olena by doxygen 1.3.6-20040222