OMNeT++ Simulation Library
6.0.3
|
16 #ifndef __OMNETPP_CNAMEDOBJECT_H
17 #define __OMNETPP_CNAMEDOBJECT_H
21 #include "simkerneldefs.h"
23 #include "cexception.h"
37 const char *name =
nullptr;
40 uint32_t flags = FL_NAMEPOOLING;
41 enum {FL_NAMEPOOLING = 1};
48 void setFlag(
int flag,
bool value) {
if (value) flags|=flag;
else flags&=~flag;}
49 int getFlag(
int flag) {
return flags & flag;}
62 explicit cNamedObject(
const char *name,
bool namepooling=
true);
90 virtual void parsimPack(
cCommBuffer *buffer)
const override;
95 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
105 virtual void setName(
const char *s);
111 virtual const char *
getName()
const override {
return name ? name :
"";}
117 virtual void setNamePooling(
bool b);
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
virtual const char * getName() const override
Definition: cnamedobject.h:111
cNamedObject()
Definition: cnamedobject.h:57
Extends cObject with a name string. Also includes a "flags" member, with bits open for use by subclas...
Definition: cnamedobject.h:34
virtual bool getNamePooling()
Definition: cnamedobject.h:122
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41