Luiza  v03-01
Public Member Functions | Protected Member Functions | List of all members
luiza::LogicalExpressions Class Reference

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

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

luiza::LogicalExpressions::LogicalExpressions ( )

C'tor.

References setValue().

virtual luiza::LogicalExpressions::~LogicalExpressions ( )
inlinevirtual

Virtual d'tor.

Member Function Documentation

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

Clear all boolean values

References setValue().

Referenced by luiza::ProcessorMgr::processData().

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

bool luiza::LogicalExpressions::getValue ( const std::string &  key)
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().


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