BALL
1.4.79
|
#include <BALL/MOLMEC/COMMON/ruleEvaluator.h>
Public Types | |
Type Definitions | |
typedef std::list< std::pair < Expression, String > > | RuleList |
typedef StringHashMap< RuleList > | RuleMap |
Public Member Functions | |
Constructors and Destructor | |
RuleEvaluator () | |
RuleEvaluator (INIFile &file, const String &prefix) | |
RuleEvaluator (const RuleEvaluator &evaluator) | |
virtual | ~RuleEvaluator () |
Accessors | |
bool | initialize (INIFile &file, const String &prefix) |
const String & | getPrefix () const |
void | setPrefix (const String &prefix) |
Assignment | |
const RuleEvaluator & | operator= (const RuleEvaluator &evaluator) |
virtual void | clear () |
Predicates | |
String | operator() (const Atom &atom) const |
bool | operator== (const RuleEvaluator &evaluator) const |
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_ |
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.
Definition at line 37 of file ruleEvaluator.h.
typedef std::list<std::pair<Expression, String> > BALL::RuleEvaluator::RuleList |
Type definition for a list containing rules.
Definition at line 49 of file ruleEvaluator.h.
Type definition for a hashmap containing the lists of rules.
Definition at line 53 of file ruleEvaluator.h.
BALL::RuleEvaluator::RuleEvaluator | ( | ) |
Default constructor
BALL::RuleEvaluator::RuleEvaluator | ( | const RuleEvaluator & | evaluator | ) |
Copy constructor
|
virtual |
Destructor
|
virtual |
Clear method
void BALL::RuleEvaluator::dump | ( | std::ostream & | s = std::cout , |
Size | indent_depth = 0 |
||
) | const |
const String& BALL::RuleEvaluator::getPrefix | ( | ) | const |
Return the prefix of the INI file sections
bool BALL::RuleEvaluator::isValid | ( | ) | 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.
const RuleEvaluator& BALL::RuleEvaluator::operator= | ( | const RuleEvaluator & | evaluator | ) |
Assignment operator
bool BALL::RuleEvaluator::operator== | ( | const RuleEvaluator & | evaluator | ) | const |
Equality operator
void BALL::RuleEvaluator::setPrefix | ( | const String & | prefix | ) |
Set the prefix of the INI file sections
|
protected |
Definition at line 144 of file ruleEvaluator.h.
|
protected |
Definition at line 147 of file ruleEvaluator.h.
|
protected |
Definition at line 150 of file ruleEvaluator.h.