|
OMNeT++ API 6.1
Discrete Event Simulation Library
|
|
16 #ifndef __OMNETPP_CDISPLAYSTRING_H
17 #define __OMNETPP_CDISPLAYSTRING_H
70 enum { MAXARGS = 16 };
77 Tag() {name=
nullptr; numArgs=0;}
80 char *buffer =
nullptr;
81 char *bufferEnd =
nullptr;
85 mutable char *assembledString =
nullptr;
86 mutable bool assembledStringValid =
true;
95 void doParse(
const char *s);
97 bool doSetTagArg(
int tagindex,
int index,
const char *value);
98 bool doSetTagArg(
const char *tagname,
int index,
const char *value);
99 int doInsertTag(
const char *tagname,
int atindex=0);
100 bool doRemoveTag(
int tagindex);
103 void assemble()
const;
105 bool pointsIntoBuffer(
char *s)
const {
return s>=buffer && s<=bufferEnd;}
106 static void strcatescaped(
char *d,
const char *s);
115 void setHostObject(
cComponent *o) {ownerComponent=o;}
116 void dump(std::ostream& out)
const;
160 operator const char *()
const {
return str();}
169 const char *str()
const;
174 void set(
const char *displaystr) {parse(displaystr);}
187 void parse(
const char *displaystr);
199 void updateWith(
const char *s);
208 bool containsTag(
const char *tagname)
const;
217 int getNumArgs(
const char *tagname)
const;
224 const char *getTagArg(
const char *tagname,
int index)
const;
235 bool setTagArg(
const char *tagname,
int index,
const char *value);
241 bool setTagArg(
const char *tagname,
int index,
long value);
248 bool removeTag(
const char *tagname);
258 int getNumTags()
const;
264 const char *getTagName(
int tagindex)
const;
270 int getTagIndex(
const char *tagname)
const;
279 int getNumArgs(
int tagindex)
const;
286 const char *getTagArg(
int tagindex,
int index)
const;
297 bool setTagArg(
int tagindex,
int index,
const char *value);
306 int insertTag(
const char *tagname,
int atindex=0);
313 bool removeTag(
int tagindex);
void set(const char *displaystr)
Definition: cdisplaystring.h:174
cDisplayString()
Definition: cdisplaystring.h:125
Common base for module and channel classes.
Definition: ccomponent.h:49
Represents a display string.
Definition: cdisplaystring.h:67
cDisplayString & operator=(const char *s)
Definition: cdisplaystring.h:155