|
OMNeT++ API 6.1
Discrete Event Simulation Library
|
|
16 #ifndef __OMNETPP_CPROPERTY_H
17 #define __OMNETPP_CPROPERTY_H
21 #include "simkerneldefs.h"
24 #include "cproperties.h"
25 #include "opp_pooledstring.h"
41 static const char *DEFAULTKEY;
60 typedef std::vector<Value> ValueList;
61 std::vector<opp_staticpooledstring> keyv;
62 std::vector<ValueList> valuesv;
68 int findKey(
const char *key)
const;
69 ValueList& getValuesVector(
const char *key);
70 const ValueList& getValuesVector(
const char *key)
const;
76 virtual void lock() {setFlag(FL_ISLOCKED,
true);}
79 virtual bool isLocked()
const {
return flags&FL_ISLOCKED;}
85 virtual void printValues(std::ostream& os)
const;
94 explicit cProperty(
const char *name=
nullptr,
const char *index=
nullptr);
118 virtual void setName(
const char *name)
override;
123 virtual const char *getFullName()
const override;
134 virtual std::string str()
const override;
139 virtual void parsimPack(
cCommBuffer *buffer)
const override;
144 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
153 virtual void setIndex(
const char *index);
161 virtual const char *getIndex()
const;
166 virtual void setIsImplicit(
bool b);
173 virtual bool isImplicit()
const;
179 virtual std::vector<const char *> getKeys()
const;
185 virtual bool containsKey(
const char *key)
const;
191 virtual void addKey(
const char *key);
204 virtual int getNumValues(
const char *key)
const;
214 virtual void setNumValues(
const char *key,
int size);
221 virtual const char *getValue(
const char *key=
"",
int index=0)
const;
229 virtual const char *getValueOriginFile(
const char *key=
"",
int index=0)
const;
237 virtual const char *getValueOriginType(
const char *key=
"",
int index=0)
const;
248 virtual void setValue(
const char *key,
int index,
const char *value,
const char *originFile=
nullptr,
const char *originType=
nullptr);
253 virtual void erase(
const char *key);
262 virtual void updateWith(
const cProperty *other);
cProperty(const cProperty &other)
Definition: cproperty.h:99
virtual int getNumKeys() const
Definition: cproperty.h:196
A collection of properties (cProperty).
Definition: cproperties.h:34
Definition: opp_pooledstring.h:29
Extends cObject with a name string. Also includes a "flags" member, with bits open for use by subclas...
Definition: cnamedobject.h:34
virtual cProperty * dup() const override
Definition: cproperty.h:128
Stores a (NED) property with its (possibly compound) value.
Definition: cproperty.h:38
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41