Loading...
Searching...
No Matches
BALL::RuleEvaluator Class Reference
Molecular Modeling » Molecular Mechanics » Rule-based parameter assignment

`#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

String | prefix_
RuleMap | rule_map_
bool | valid_
bool | isValid () const
void | dump (std::ostream &s=std::cout, Size indent_depth=0) const
void | extractSection_ (INIFile &file, const String &symbol)

## 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

Definition at line 37 of file ruleEvaluator.h.

## Member Typedef Documentation

## RuleList

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.

## RuleMap

typedef StringHashMap<RuleList> BALL::RuleEvaluator::RuleMap

Type definition for a hashmap containing the lists of rules.

Definition at line 53 of file ruleEvaluator.h.

## Constructor & Destructor Documentation

## RuleEvaluator() [1/3]

BALL::RuleEvaluator::RuleEvaluator | ( |  | ) |

Default constructor

## RuleEvaluator() [2/3]

BALL::RuleEvaluator::RuleEvaluator | ( | INIFile & | file,
|  | const String & | prefix )

Detailed constructor

## RuleEvaluator() [3/3]

BALL::RuleEvaluator::RuleEvaluator | ( | const RuleEvaluator & | evaluator | ) |

Copy constructor

## ~RuleEvaluator()

virtual BALL::RuleEvaluator::~RuleEvaluator | ( |  | ) |

virtual

Destructor

## Member Function Documentation

## clear()

virtual void BALL::RuleEvaluator::clear | ( |  | ) |

virtual

Clear method

## dump()

void BALL::RuleEvaluator::dump | ( | std::ostream & | s = std::cout,
|  | Size | indent_depth = 0 ) const

## extractSection_()

void BALL::RuleEvaluator::extractSection_ | ( | INIFile & | file,
|  | const String & | symbol )

protected

## getPrefix()

const String & BALL::RuleEvaluator::getPrefix | ( |  | ) | const

Return the prefix of the INI file sections

## initialize()

bool BALL::RuleEvaluator::initialize | ( | INIFile & | file,
|  | const String & | prefix )

## isValid()

bool BALL::RuleEvaluator::isValid | ( |  | ) | const

## operator()()

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.

## operator=()

const RuleEvaluator & BALL::RuleEvaluator::operator= | ( | const RuleEvaluator & | evaluator | ) |

Assignment operator

## operator==()

bool BALL::RuleEvaluator::operator== | ( | const RuleEvaluator & | evaluator | ) | const

Equality operator

## setPrefix()

void BALL::RuleEvaluator::setPrefix | ( | const String & | prefix | ) |

Set the prefix of the INI file sections

## Member Data Documentation

## prefix_

String BALL::RuleEvaluator::prefix_

protected

Definition at line 144 of file ruleEvaluator.h.

## rule_map_

RuleMap BALL::RuleEvaluator::rule_map_

protected

Definition at line 147 of file ruleEvaluator.h.

## valid_

bool BALL::RuleEvaluator::valid_

protected

Definition at line 150 of file ruleEvaluator.h.