|
OMNeT++ API 6.1
Discrete Event Simulation Library
|
|
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,
70 static long totalParimplObjs;
71 static long liveParimplObjs;
77 typedef cPar::Type Type;
113 virtual cParImpl *dup()
const override;
118 virtual void parsimPack(
cCommBuffer *buffer)
const override;
123 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
131 virtual Type getType()
const = 0;
136 virtual bool isNumeric()
const = 0;
141 virtual bool isVolatile()
const {
return flags & FL_ISVOLATILE;}
146 virtual bool isMutable()
const {
return flags & FL_ISMUTABLE;}
158 virtual bool isShared()
const {
return flags & FL_ISSHARED;}
171 virtual bool isSet()
const {
return flags & FL_ISSET;}
192 virtual void setIsSet(
bool f) {setFlag(FL_ISSET,f);}
199 virtual const char *
getUnit()
const {
return unit.c_str();}
204 virtual void setUnit(
const char *s) {unit = s;}
221 virtual void setSourceLocation(
const FileLine &loc);
226 virtual void clearSourceLocation();
241 virtual void setBoolValue(
bool b) = 0;
246 virtual void setIntValue(
intval_t l) = 0;
251 virtual void setDoubleValue(
double d) = 0;
258 virtual void setStringValue(
const char *s) = 0;
268 virtual void setObjectValue(
cObject *
object) = 0;
292 virtual bool boolValue(
cComponent *context)
const = 0;
304 virtual double doubleValue(
cComponent *context)
const = 0;
314 virtual const char *stringValue(
cComponent *context)
const = 0;
319 virtual std::string stdstringValue(
cComponent *context)
const = 0;
345 virtual void convertToConst(
cComponent *context) = 0;
352 virtual void parse(
const char *text,
FileLine loc) = 0;
357 static cParImpl *createWithType(Type type);
363 virtual int compare(
const cParImpl *other)
const;
static long getTotalParImplObjectCount()
Definition: cparimpl.h:382
virtual void forEachChild(cVisitor *v, cComponent *context)
Definition: cparimpl.h:368
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:182
virtual const FileLine & getSourceLocation() const
Definition: cparimpl.h:232
Abstract base class for expression evaluators.
Definition: cexpression.h:33
virtual const char * getUnit() const
Definition: cparimpl.h:199
virtual void forEachChild(cVisitor *v)
virtual void setIsSet(bool f)
Definition: cparimpl.h:192
Enables traversing the tree of (cObject-rooted) simulation objects.
Definition: cvisitor.h:56
cParImpl(const cParImpl &other)
Definition: cparimpl.h:95
Definition: fileline.h:27
virtual void setBaseDirectory(const char *s)
Definition: cparimpl.h:216
virtual void setIsVolatile(bool f)
Definition: cparimpl.h:177
virtual bool containsValue() const
Definition: cparimpl.h:164
virtual bool isSet() const
Definition: cparimpl.h:171
static void resetParImplObjectCounters()
Definition: cparimpl.h:396
virtual const char * getBaseDirectory() const
Definition: cparimpl.h:210
Definition: opp_pooledstring.h:29
virtual void setStringValue(const std::string &s)
Definition: cparimpl.h:263
static long getLiveParImplObjectCount()
Definition: cparimpl.h:390
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:146
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:204
virtual bool isShared() const
Definition: cparimpl.h:158
virtual bool isVolatile() const
Definition: cparimpl.h:141
virtual void setIsShared(bool f)
Definition: cparimpl.h:187
virtual bool isExpression() const
Definition: cparimpl.h:153
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41