OMNeT++ Simulation Library
6.0.3
|
16 #ifndef __OMNETPP_CPARIMPL_H
17 #define __OMNETPP_CPARIMPL_H
20 #include "cexpression.h"
21 #include "cexception.h"
23 #include "opp_pooledstring.h"
54 FL_CONTAINSVALUE = 32,
67 static long totalParimplObjs;
68 static long liveParimplObjs;
74 typedef cPar::Type Type;
109 virtual cParImpl *dup()
const override;
114 virtual void parsimPack(
cCommBuffer *buffer)
const override;
119 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
127 virtual Type getType()
const = 0;
132 virtual bool isNumeric()
const = 0;
137 virtual bool isVolatile()
const {
return flags & FL_ISVOLATILE;}
142 virtual bool isMutable()
const {
return flags & FL_ISMUTABLE;}
154 virtual bool isShared()
const {
return flags & FL_ISSHARED;}
167 virtual bool isSet()
const {
return flags & FL_ISSET;}
188 virtual void setIsSet(
bool f) {setFlag(FL_ISSET,f);}
195 virtual const char *
getUnit()
const {
return unit.c_str();}
200 virtual void setUnit(
const char *s) {unit = s;}
221 virtual void setBoolValue(
bool b) = 0;
226 virtual void setIntValue(
intval_t l) = 0;
231 virtual void setDoubleValue(
double d) = 0;
238 virtual void setStringValue(
const char *s) = 0;
248 virtual void setObjectValue(
cObject *
object) = 0;
272 virtual bool boolValue(
cComponent *context)
const = 0;
284 virtual double doubleValue(
cComponent *context)
const = 0;
294 virtual const char *stringValue(
cComponent *context)
const = 0;
299 virtual std::string stdstringValue(
cComponent *context)
const = 0;
324 virtual void convertToConst(
cComponent *context) = 0;
331 virtual void parse(
const char *text,
FileLine loc) = 0;
336 static cParImpl *createWithType(Type type);
342 virtual int compare(
const cParImpl *other)
const;
static long getTotalParImplObjectCount()
Definition: cparimpl.h:361
virtual void forEachChild(cVisitor *v, cComponent *context)
Definition: cparimpl.h:347
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
A variant-like value class used during evaluating NED expressions.
Definition: cvalue.h:47
virtual void setIsMutable(bool f)
Definition: cparimpl.h:178
Abstract base class for expression evaluators.
Definition: cexpression.h:33
virtual const char * getUnit() const
Definition: cparimpl.h:195
virtual void forEachChild(cVisitor *v)
virtual void setIsSet(bool f)
Definition: cparimpl.h:188
Enables traversing the tree of (cObject-rooted) simulation objects.
Definition: cvisitor.h:56
cParImpl(const cParImpl &other)
Definition: cparimpl.h:91
Definition: fileline.h:27
virtual void setBaseDirectory(const char *s)
Definition: cparimpl.h:212
virtual void setIsVolatile(bool f)
Definition: cparimpl.h:173
virtual bool containsValue() const
Definition: cparimpl.h:160
virtual bool isSet() const
Definition: cparimpl.h:167
static void resetParImplObjectCounters()
Definition: cparimpl.h:375
virtual const char * getBaseDirectory() const
Definition: cparimpl.h:206
Definition: opp_pooledstring.h:29
virtual void setStringValue(const std::string &s)
Definition: cparimpl.h:243
static long getLiveParImplObjectCount()
Definition: cparimpl.h:369
int64_t intval_t
Signed integer type which is guaranteed to be at least 64 bits wide. It is used throughout the librar...
Definition: simkerneldefs.h:101
virtual bool isMutable() const
Definition: cparimpl.h:142
Internal class that stores values for cPar objects.
Definition: cparimpl.h:46
Extends cObject with a name string. Also includes a "flags" member, with bits open for use by subclas...
Definition: cnamedobject.h:34
Represents an XML element in an XML configuration file.
Definition: cxmlelement.h:75
Common base for module and channel classes.
Definition: ccomponent.h:49
virtual void setUnit(const char *s)
Definition: cparimpl.h:200
virtual bool isShared() const
Definition: cparimpl.h:154
virtual bool isVolatile() const
Definition: cparimpl.h:137
virtual void setIsShared(bool f)
Definition: cparimpl.h:183
virtual bool isExpression() const
Definition: cparimpl.h:149
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41