|
Luiza
v03-01
|
#include <LogicalExpressions.h>
Public Member Functions | |
| LogicalExpressions () | |
| virtual | ~LogicalExpressions () |
| void | addCondition (const std::string &name, const std::string &expression) |
| void | clear () |
| bool | conditionIsTrue (const std::string &name) |
| bool | expressionIsTrue (const std::string &expression) |
| void | setValue (const std::string &key, bool val) |
Protected Member Functions | |
| bool | getValue (const std::string &key) |
Helper class that holds named boolean values and named conditions that are expressions of these values and computes the corresponding truth values.
| luiza::LogicalExpressions::LogicalExpressions | ( | ) |
C'tor.
References setValue().
|
inlinevirtual |
Virtual d'tor.
| void luiza::LogicalExpressions::addCondition | ( | const std::string & | name, |
| const std::string & | expression | ||
| ) |
Add a new named logical expression formed out of [!,(,&&,||,),value], e.g.
( A && ( B || !C ) ) || ( !B && D )
Referenced by luiza::ProcessorMgr::addActiveProcessor().
| void luiza::LogicalExpressions::clear | ( | ) |
| bool luiza::LogicalExpressions::conditionIsTrue | ( | const std::string & | name | ) |
True if the named condition (stored with addCondition) is true with the current values
References expressionIsTrue().
Referenced by luiza::ProcessorMgr::processData().
| bool luiza::LogicalExpressions::expressionIsTrue | ( | const std::string & | expression | ) |
True if the given expression is true with the current values
References getValue().
Referenced by conditionIsTrue().
|
protected |
helper function for finding return values, that actually have been set by their corresponding processor - throws exception if not set
Referenced by expressionIsTrue().
| void luiza::LogicalExpressions::setValue | ( | const std::string & | key, |
| bool | val | ||
| ) |
Set the the boolean value for the given key
Referenced by clear(), LogicalExpressions(), and luiza::ProcessorMgr::setProcessorReturnValue().
1.8.9.1