Helper class that holds named boolean values and named conditions that are expressions of these values and computes the corresponding truth values. More...
#include <LogicalExpressions.h>
Public Member Functions | |
LogicalExpressions () | |
C'tor. | |
virtual | ~LogicalExpressions () |
Virtual d'tor. More... | |
void | addCondition (const std::string &name, const std::string &expression) |
Add a new named logical expression formed out of [!,(,&&,||,),value], e.g. More... | |
void | clear () |
Clear all boolean values. | |
bool | conditionIsTrue (const std::string &name) |
True if the named condition (stored with addCondition) is true with the current values. | |
bool | expressionIsTrue (const std::string &expression) |
True if the given expression is true with the current values. | |
void | setValue (const std::string &key, bool val) |
Set the the boolean value for the given key. | |
Protected Member Functions | |
bool | getValue (const std::string &key) |
helper function for finding return values, that actually have been set by their corresponding processor - throws exception if not set | |
Protected Attributes | |
ConditionsMap | _condMap {} |
ResultMap | _resultMap {} |
Helper class that holds named boolean values and named conditions that are expressions of these values and computes the corresponding truth values.
|
inlinevirtual |
Virtual d'tor.
void marlin::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 marlin::ProcessorMgr::addActiveProcessor().