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

#include <BALL/MOLMEC/COMMON/ruleEvaluator.h>

List of all members.

Public Types

Type Definitions

typedef std::list< std::pair
< Expression, String > > 
RuleList
typedef StringHashMap< RuleListRuleMap

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 StringgetPrefix () const
void setPrefix (const String &prefix)
Assignment

const RuleEvaluatoroperator= (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_

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

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.


Constructor & Destructor Documentation

BALL::RuleEvaluator::RuleEvaluator (  ) 

Default constructor

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

Detailed constructor

BALL::RuleEvaluator::RuleEvaluator ( const RuleEvaluator evaluator  ) 

Copy constructor

virtual BALL::RuleEvaluator::~RuleEvaluator (  )  [virtual]

Destructor


Member Function Documentation

virtual void BALL::RuleEvaluator::clear (  )  [virtual]

Clear method

void BALL::RuleEvaluator::dump ( std::ostream &  s = std::cout,
Size  indent_depth = 0 
) const
void BALL::RuleEvaluator::extractSection_ ( INIFile file,
const String symbol 
) [protected]
const String& BALL::RuleEvaluator::getPrefix (  )  const

Return the prefix of the INI file sections

bool BALL::RuleEvaluator::initialize ( INIFile file,
const String prefix 
)
bool BALL::RuleEvaluator::isValid (  )  const
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.

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


Member Data Documentation

Definition at line 144 of file ruleEvaluator.h.

Definition at line 147 of file ruleEvaluator.h.

Definition at line 150 of file ruleEvaluator.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3