#include <LogicExpression.h>
Definition at line 27 of file LogicExpression.h.
◆ LogicExpression() [1/2]
LogicExpression::LogicExpression |
( |
std::ostream & |
o = std::cout | ) |
|
◆ ~LogicExpression()
virtual TrigConf::LogicExpression::~LogicExpression |
( |
| ) |
|
|
virtualdefault |
◆ LogicExpression() [2/2]
LogicExpression::LogicExpression |
( |
const std::string & |
name, |
|
|
std::ostream & |
o = std::cout |
|
) |
| |
◆ addSubLogic()
◆ clear()
void LogicExpression::clear |
( |
| ) |
|
◆ element()
const std::string& TrigConf::LogicExpression::element |
( |
| ) |
const |
|
inline |
◆ extractElementName()
std::string LogicExpression::extractElementName |
( |
const std::string & |
expr | ) |
|
|
static |
◆ isPlaceHolder()
bool TrigConf::LogicExpression::isPlaceHolder |
( |
| ) |
const |
|
inline |
◆ isValidElementChar()
bool LogicExpression::isValidElementChar |
( |
char |
c | ) |
|
|
static |
Definition at line 29 of file LogicExpression.cxx.
30 std::string valid_sym =
"_";
31 if (isalpha(
c) || isdigit(
c) || valid_sym.find(
c)!=std::string::npos) {
◆ logicRep()
std::string LogicExpression::logicRep |
( |
| ) |
const |
|
virtual |
◆ markPlaceHolder()
void LogicExpression::markPlaceHolder |
( |
| ) |
|
◆ normalize()
void LogicExpression::normalize |
( |
| ) |
|
Definition at line 204 of file LogicExpression.cxx.
205 LogicV_t::const_iterator
p;
216 for (
p=sublogics.begin();
p!=sublogics.end(); ++
p) {
◆ parse()
int LogicExpression::parse |
( |
const std::string & |
expr, |
|
|
bool |
enclosed = false |
|
) |
| |
|
virtual |
Definition at line 51 of file LogicExpression.cxx.
59 while (no_problem &&
i < expr.size()) {
66 if ( (
n = sub.parse(expr.substr(
i+1),
true)) > 0) {
83 std::ostringstream formatedoutput;
97 std::ostringstream formatedoutput;
98 formatedoutput <<
kAND <<
" or " <<
kOR <<
" must come after a logic element";
112 }
else if ( (
i+1)<expr.size() && expr[
i+1]==
kOPEN) {
114 if ( (
n = sub2.parse(expr.substr(
i+2),
true)) > 0) {
115 sub.addSubLogic(sub2);
122 printError(
"Was expecting a sub-logic after !",
i);
126 printError(
"! must not come directly after a logic element",
i);
136 if (
name.size() > 0) {
145 printError(
"A logic element may not come immediately after another logic element",
i);
160 printError(
"The expression started with a '(' but ')' not found.",
i);
◆ print()
void LogicExpression::print |
( |
const std::string & |
indent = "" | ) |
|
◆ printCurrentState()
void LogicExpression::printCurrentState |
( |
| ) |
|
Definition at line 259 of file LogicExpression.cxx.
261 sprintf(aaa,
"Current state: State=%c Nsublogics=%d Element=%s",
◆ printError()
void LogicExpression::printError |
( |
const std::string & |
message, |
|
|
int |
i |
|
) |
| |
Definition at line 246 of file LogicExpression.cxx.
247 std::string
m=
"Error while parsing : ";
250 for (
int j=0; j<(
n+
i); ++j)
s +=
" ";
◆ setElement()
void TrigConf::LogicExpression::setElement |
( |
const std::string & |
e | ) |
|
|
inline |
◆ setState()
void TrigConf::LogicExpression::setState |
( |
char |
s | ) |
|
|
inline |
◆ state()
char TrigConf::LogicExpression::state |
( |
| ) |
const |
|
inline |
◆ subLogic()
◆ subLogics()
◆ totalNumberOfElements()
int LogicExpression::totalNumberOfElements |
( |
| ) |
const |
Definition at line 224 of file LogicExpression.cxx.
226 LogicV_t::const_iterator
p;
234 n += (*p)->totalNumberOfElements();
◆ kAND
const char TrigConf::LogicExpression::kAND = '&' |
|
static |
◆ kCLOSE
const char TrigConf::LogicExpression::kCLOSE = ')' |
|
static |
')' is a valid symbol, but not allowed as a state.
Definition at line 37 of file LogicExpression.h.
◆ kELEMENT
const char TrigConf::LogicExpression::kELEMENT = '#' |
|
static |
◆ kNOT
const char TrigConf::LogicExpression::kNOT = '!' |
|
static |
◆ kOPEN
const char TrigConf::LogicExpression::kOPEN = '(' |
|
static |
◆ kOR
const char TrigConf::LogicExpression::kOR = '|' |
|
static |
◆ m_Element
std::string TrigConf::LogicExpression::m_Element |
|
protected |
◆ m_LogicRep
std::string TrigConf::LogicExpression::m_LogicRep |
|
protected |
◆ m_ostream
std::ostream& TrigConf::LogicExpression::m_ostream |
|
protected |
◆ m_State
char TrigConf::LogicExpression::m_State |
|
protected |
◆ m_SubLogics
LogicV_t TrigConf::LogicExpression::m_SubLogics |
|
protected |
The documentation for this class was generated from the following files: