15 if( e.
isNot ) s <<
" ! " ;
59 if( tokens.
size() == 1
60 && tokens[0].Value.find(
'&') == std::string::npos
61 && tokens[0].Value.find(
'|') == std::string::npos ) {
63 if( tokens[0].isNot ) {
66 return !
getValue( tokens[0].Value ) ;
77 bool returnVal = true ;
84 tokenValue = ! tokenValue ;
87 returnVal &= tokenValue ;
89 returnVal |= tokenValue ;
117 error <<
"LogicalExpressions::getValue(): key \"" << key <<
"\" not found. Bad processor condition?\n";
122 streamlog_out( DEBUG ) <<
" key : " << it->first <<
" val: " << it->second <<
std::endl ;
void clear()
Clear all boolean values.
void setValue(const std::string &key, bool val)
Set the the boolean value for the given key.
bool getValue(const std::string &key)
helper function for finding return values, that actually have been set by their corresponding process...
ParseException used for parse errors, e.g.
Helper class for LogicalExpressions that splits the expression into subexpressions - needs to be apll...
Helper struct for LogicalExpression.
bool expressionIsTrue(const std::string &expression)
True if the given expression is true with the current values.
LogicalExpressions()
C'tor.
bool conditionIsTrue(const std::string &name)
True if the named condition (stored with addCondition) is true with the current values.
void addCondition(const std::string &name, const std::string &expression)
Add a new named logical expression formed out of [!,(,&&,||,),value], e.g.
std::ostream & operator<<(std::ostream &s, Expression &e)