Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Arak::QueryPointPotential Class Reference

#include <point_obs.hpp>

Inheritance diagram for Arak::QueryPointPotential:

Inheritance graph
[legend]
Collaboration diagram for Arak::QueryPointPotential:

Collaboration graph
[legend]
List of all members.

Detailed Description

An object that listens to the color of a point and updates a potential to reflect its current cost.

Definition at line 15 of file point_obs.hpp.

Public Member Functions

 QueryPointPotential (double &potential, double blackVal, double whiteVal)
 Constructor.

virtual void recolor (Color color)
 Reacts to information that the query point has been recolored.


Private Attributes

double & potential
 The potential value that is updated.

Color color
 The current color of the point.

const double blackVal
 The amount by which the potential should be increased if the point is black.

const double whiteVal
 The amount by which the potential should be increased if the point is white.


Constructor & Destructor Documentation

Arak::QueryPointPotential::QueryPointPotential double &  potential,
double  blackVal,
double  whiteVal
[inline]
 

Constructor.

Parameters:
potential the potential that is updated
blackVal the amount the potential is increased when the point is black
whiteVal the amount the potential is increased when the point is white

Definition at line 50 of file point_obs.hpp.

References Arak::INVALID_COLOR.


Member Function Documentation

virtual void Arak::QueryPointPotential::recolor Color  color  )  [inline, virtual]
 

Reacts to information that the query point has been recolored.

If the color has changed, the potential is updated accordingly.

Parameters:
color the query point's new color

Implements Arak::QueryPointListener.

Definition at line 64 of file point_obs.hpp.

References Arak::BLACK, blackVal, potential, Arak::WHITE, and whiteVal.


Member Data Documentation

const double Arak::QueryPointPotential::blackVal [private]
 

The amount by which the potential should be increased if the point is black.

Definition at line 31 of file point_obs.hpp.

Referenced by recolor().

Color Arak::QueryPointPotential::color [private]
 

The current color of the point.

Definition at line 25 of file point_obs.hpp.

double& Arak::QueryPointPotential::potential [private]
 

The potential value that is updated.

Definition at line 20 of file point_obs.hpp.

Referenced by recolor().

const double Arak::QueryPointPotential::whiteVal [private]
 

The amount by which the potential should be increased if the point is white.

Definition at line 37 of file point_obs.hpp.

Referenced by recolor().


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:41:25 2005 for Arak by doxygen 1.3.6