16 #ifndef __OMNETPP_CEXPRESSION_H 17 #define __OMNETPP_CEXPRESSION_H 20 #include "cexception.h" 21 #include "cnedvalue.h" 76 virtual cExpression *
dup()
const override {copyNotSupported();
return nullptr;}
81 virtual std::string
str()
const override {
return "";}
106 virtual bool boolValue(
Context *context)
const = 0;
113 virtual intpar_t intValue(
Context *context,
const char *expectedUnit=
nullptr)
const = 0;
120 virtual double doubleValue(
Context *context,
const char *expectedUnit=
nullptr)
const = 0;
126 virtual std::string stringValue(
Context *context)
const = 0;
147 virtual bool boolValue(
cComponent *contextComponent=
nullptr)
const;
156 virtual intpar_t intValue(
cComponent *contextComponent=
nullptr,
const char *expectedUnit=
nullptr)
const;
165 virtual double doubleValue(
cComponent* contextComponent=
nullptr,
const char *expectedUnit=
nullptr)
const;
173 virtual std::string stringValue(
cComponent *contextComponent=
nullptr)
const;
193 virtual void parse(
const char *text) = 0;
199 virtual int compare(
const cExpression *other)
const = 0;
204 virtual bool containsConstSubexpressions()
const = 0;
210 virtual void evaluateConstSubexpressions(
Context *context) = 0;
Thrown when the simulation kernel or other components detect a runtime error.
Definition: cexception.h:283
Common base for module and channel classes.
Definition: ccomponent.h:48
Root of the OMNeT++ class hierarchy. cObject is a lightweight class without any data members...
Definition: cobject.h:58
virtual void parsimUnpack(cCommBuffer *buffer) override
Definition: cexpression.h:91
Represents an XML element in an XML configuration file.
Definition: cxmlelement.h:73
int64_t intpar_t
Type for NED parameter values that store integers. It is guaranteed to be signed and at least as wide...
Definition: simkerneldefs.h:86
Value used during evaluating NED expressions.
Definition: cnedvalue.h:50
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41
virtual ~cExpression()
Definition: cexpression.h:63
Definition: cabstracthistogram.h:21
virtual cExpression * dup() const override
Definition: cexpression.h:76
virtual std::string str() const override
Definition: cexpression.h:81
cExpression & operator=(const cExpression &other)
Definition: cexpression.h:68
cExpression()
Definition: cexpression.h:53
Contextual information for evaluating the expression.
Definition: cexpression.h:39
Abstract base class for expression evaluators.
Definition: cexpression.h:33
cExpression(const cExpression &other)
Definition: cexpression.h:58
virtual void parsimPack(cCommBuffer *buffer) const override
Definition: cexpression.h:86