Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

RS::PredicateWithPosition Class Reference

This class is the abstract base class for all predicates that uses a position as argument. More...

Inheritance diagram for RS::PredicateWithPosition:

Inheritance graph
[legend]
Collaboration diagram for RS::PredicateWithPosition:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PredicateWithPosition (const Point &pos)
 Constructor taking the default argument for the position used as an argument in the predicate.

 PredicateWithPosition (const PredicateWithPosition &)
 Creates a predicate that is an exact copy of obj.

virtual ~PredicateWithPosition ()
 Destroys the predicate.

PredicateWithPosition & operator= (const PredicateWithPosition &)
 Assignment operator.

virtual void setArguments (const std::vector< Float > &arguments) throw (TooFewArgumentsException)
 Used to set the predicate's arguments in a generic way.

virtual void setPosition (const Point &pos)
 Used to set the predicate's position argument to pos.

virtual Point getPosition () const
 Return the predicate's position argument.

virtual FuzzyBool evaluate ()=0
 Should return the truth value of the predicate.

virtual FuzzyBool evaluate (const Point &pos)
 This method is used to first set the argument of the predicate and then evaluate it.


Protected Attributes

Point position
 The position argument.


Detailed Description

This class is the abstract base class for all predicates that uses a position as argument.

Unit:
Framework
Revision
1.1
Author
frehe
Date
2000/09/13 03:11:41

Definition at line 68 of file PredicateWithPosition.h.


Member Function Documentation

PredicateWithPosition & RS::PredicateWithPosition::operator= const PredicateWithPosition &   
 

Assignment operator.

Assigns obj to this object.

Definition at line 70 of file PredicateWithPosition.cc.

References position.

void RS::PredicateWithPosition::setArguments const std::vector< Float > &    arguments throw (TooFewArgumentsException) [inline, virtual]
 

Used to set the predicate's arguments in a generic way.

The first value in the vector will be interpreted as the X-coordinate and the second value the Y-coordinate.

Implements RS::PredicateWithArguments.

Definition at line 52 of file PredicateWithPosition.icc.

References RS_THROW.

FuzzyBool RS::PredicateWithPosition::evaluate const Point   pos [inline, virtual]
 

This method is used to first set the argument of the predicate and then evaluate it.

It uses the methods setPosition and evaluate(), so it should not be overriden unless it should made unavailable.

Definition at line 76 of file PredicateWithPosition.icc.

References evaluate(), and setPosition().


The documentation for this class was generated from the following files:
Generated on Mon Aug 29 08:26:28 2011 for RoboSoc by doxygen1.3-rc3