Marlin  1.17.1
 All Classes Namespaces Functions Variables Enumerations Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
marlin::LogicalExpressions Class Reference

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 {}
 

Detailed Description

Helper class that holds named boolean values and named conditions that are expressions of these values and computes the corresponding truth values.

Constructor & Destructor Documentation

virtual marlin::LogicalExpressions::~LogicalExpressions ( )
inlinevirtual

Virtual d'tor.

Member Function Documentation

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().


The documentation for this class was generated from the following files: