BALL::RuleEvaluator Class Reference
[Rule-based parameter assignment]

Rule evaluator class. More...

#include <ruleEvaluator.h>

List of all members.


Public Types

Type Definitions
typedef std::list< std::pair
< Expression, String > >
RuleList
Type definition for a list containing rules.
typedef StringHashMap< RuleList > RuleMap
Type definition for a hashmap containing the lists of rules.

Public Member Functions

Constructors and Destructor
RuleEvaluator ()
Default constructor.
RuleEvaluator (INIFile &file, const String &prefix)
Detailed constructor.
RuleEvaluator (const RuleEvaluator &evaluator)
Copy constructor.
virtual ~RuleEvaluator ()
Destructor.
Accessors
bool initialize (INIFile &file, const String &prefix)
const String & getPrefix () const
Return the prefix of the INI file sections.
void setPrefix (const String &prefix)
Set the prefix of the INI file sections.
Assignment
const RuleEvaluator & operator= (const RuleEvaluator &evaluator)
Assignment operator.
virtual void clear ()
Clear method.
Predicates
String operator() (const Atom &atom) const
Rule evaluation.
bool operator== (const RuleEvaluator &evaluator) const
Equality operator.
Debugging and Diagnostics
bool isValid () const
void dump (std::ostream &s=std::cout, Size indent_depth=0) const

Protected Member Functions

void extractSection_ (INIFile &file, const String &symbol)

Protected Attributes

String prefix_
RuleMap rule_map_
bool valid_

Detailed Description

Rule evaluator class.

This class provides means for evaluating rules on Atoms. It is a helper class of RuleProcessors. Rules define values depending on atom constellations. They are defined in an INIFile.

See also:
RuleProcessor

Member Function Documentation

String BALL::RuleEvaluator::operator() ( const Atom & atom ) const

Rule evaluation.

Evaluate all matching rules (in the correct order) and return the corresponding value. If no rule matches, an empty string is returned.


Generated on Thu Aug 6 18:30:36 2009 for BALL by doxygen 1.5.8