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

RS::PredicateWithVector Class Reference

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

Inheritance diagram for RS::PredicateWithVector:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PredicateWithVector (const Vector &vec)
 Constructor taking the default argument for the vector used as an argument in the predicate.

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

virtual ~PredicateWithVector ()
 Destroys the predicate.

PredicateWithVector & operator= (const PredicateWithVector &)
 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 setVector (const Vector &vec)
 Used to set the predicate's vector argument to pos.

virtual Vector getVector () const
 Return the predicate's vector argument.

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

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


Protected Attributes

Vector vector
 The vector argument.


Detailed Description

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

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

Definition at line 68 of file PredicateWithVector.h.


Member Function Documentation

PredicateWithVector & RS::PredicateWithVector::operator= const PredicateWithVector &   
 

Assignment operator.

Assigns obj to this object.

Definition at line 70 of file PredicateWithVector.cc.

References vector.

void RS::PredicateWithVector::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 distance and the second value as the direction in degrees.

Implements RS::PredicateWithArguments.

Definition at line 52 of file PredicateWithVector.icc.

References RS_THROW, and RS::Vector.

FuzzyBool RS::PredicateWithVector::evaluate const Vector   vec [inline, virtual]
 

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

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

Definition at line 76 of file PredicateWithVector.icc.

References evaluate(), and setVector().


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