16 #ifndef __OMNETPP_CPARIMPL_H 17 #define __OMNETPP_CPARIMPL_H 20 #include "cexpression.h" 21 #include "cstringpool.h" 22 #include "cexception.h" 52 FL_CONTAINSVALUE = 32,
61 static long totalParimplObjs;
62 static long liveParimplObjs;
69 typedef cPar::Type Type;
104 virtual cParImpl *dup()
const override;
109 virtual void parsimPack(
cCommBuffer *buffer)
const override;
114 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
122 virtual Type getType()
const = 0;
127 virtual bool isNumeric()
const = 0;
132 virtual bool isVolatile()
const {
return flags & FL_ISVOLATILE;}
144 virtual bool isShared()
const {
return flags & FL_ISSHARED;}
157 virtual bool isSet()
const {
return flags & FL_ISSET;}
173 virtual void setIsSet(
bool f) {setFlag(FL_ISSET,f);}
180 virtual const char *getUnit()
const;
185 virtual void setUnit(
const char *s);
194 virtual void setBoolValue(
bool b) = 0;
199 virtual void setIntValue(
intpar_t l) = 0;
204 virtual void setDoubleValue(
double d) = 0;
211 virtual void setStringValue(
const char *s) = 0;
240 virtual bool boolValue(
cComponent *context)
const = 0;
252 virtual double doubleValue(
cComponent *context)
const = 0;
262 virtual const char *stringValue(
cComponent *context)
const = 0;
267 virtual std::string stdstringValue(
cComponent *context)
const = 0;
287 virtual void convertToConst(
cComponent *context) = 0;
292 virtual bool containsConstSubexpressions()
const;
298 virtual void evaluateConstSubexpressions(
cComponent *context);
305 virtual void parse(
const char *text) = 0;
310 static cParImpl *createWithType(Type type);
316 virtual int compare(
const cParImpl *other)
const;
Common base for module and channel classes.
Definition: ccomponent.h:48
virtual bool isShared() const
Definition: cparimpl.h:144
Represents an XML element in an XML configuration file.
Definition: cxmlelement.h:73
virtual bool containsValue() const
Definition: cparimpl.h:150
Extends cObject with a name string. Also includes a "flags" member, with bits open for use by subclas...
Definition: cnamedobject.h:36
virtual bool isSet() const
Definition: cparimpl.h:157
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
virtual bool isExpression() const
Definition: cparimpl.h:139
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41
virtual bool isVolatile() const
Definition: cparimpl.h:132
static void resetParImplObjectCounters()
Definition: cparimpl.h:349
virtual void forEachChild(cVisitor *v)
virtual void setIsSet(bool f)
Definition: cparimpl.h:173
virtual void forEachChild(cVisitor *v, cComponent *context)
Definition: cparimpl.h:321
Enables traversing the tree of (cObject-rooted) simulation objects.
Definition: cvisitor.h:56
static long getTotalParImplObjectCount()
Definition: cparimpl.h:335
Definition: cabstracthistogram.h:21
cParImpl(const cParImpl &other)
Definition: cparimpl.h:86
virtual void setIsShared(bool f)
Definition: cparimpl.h:168
virtual void setStringValue(const std::string &s)
Definition: cparimpl.h:216
Abstract base class for expression evaluators.
Definition: cexpression.h:33
Internal class that stores values for cPar objects.
Definition: cparimpl.h:44
virtual void setIsVolatile(bool f)
Definition: cparimpl.h:163
static long getLiveParImplObjectCount()
Definition: cparimpl.h:343
Reference-counted storage for strings.
Definition: cstringpool.h:36