 |
OMNeT++ API 6.2.0
Discrete Event Simulation Library
|
|
16 #ifndef __OMNETPP_CDISPLAYSTRING_H
17 #define __OMNETPP_CDISPLAYSTRING_H
71 enum { MAXARGS = 16 };
78 Tag() {name=
nullptr; numArgs=0;}
81 char *buffer =
nullptr;
82 char *bufferEnd =
nullptr;
86 mutable char *assembledString =
nullptr;
87 mutable bool assembledStringValid =
true;
96 void doParse(
const char *s);
98 bool doSetTagArg(
int tagindex,
int index,
const char *value);
99 bool doSetTagArg(
const char *tagname,
int index,
const char *value);
100 int doInsertTag(
const char *tagname,
int atindex=0);
101 bool doRemoveTag(
int tagindex);
104 void assemble()
const;
106 bool pointsIntoBuffer(
char *s)
const {
return s>=buffer && s<=bufferEnd;}
107 static void strcatescaped(
char *d,
const char *s);
116 void setHostObject(
cComponent *o) {ownerComponent=o;}
117 void dump(std::ostream& out)
const;
161 operator const char *()
const {
return str();}
170 const char *str()
const;
175 void set(
const char *displaystr) {parse(displaystr);}
188 void parse(
const char *displaystr);
200 void updateWith(
const char *s);
209 bool containsTag(
const char *tagname)
const;
218 int getNumArgs(
const char *tagname)
const;
225 const char *getTagArg(
const char *tagname,
int index)
const;
236 bool setTagArg(
const char *tagname,
int index,
const char *value);
242 bool setTagArg(
const char *tagname,
int index,
long value);
249 bool removeTag(
const char *tagname);
259 int getNumTags()
const;
265 const char *getTagName(
int tagindex)
const;
271 int getTagIndex(
const char *tagname)
const;
280 int getNumArgs(
int tagindex)
const;
287 const char *getTagArg(
int tagindex,
int index)
const;
298 bool setTagArg(
int tagindex,
int index,
const char *value);
307 int insertTag(
const char *tagname,
int atindex=0);
314 bool removeTag(
int tagindex);
void set(const char *displaystr)
Definition: cdisplaystring.h:175
cDisplayString()
Definition: cdisplaystring.h:126
Common base for module and channel classes.
Definition: ccomponent.h:49
Represents a display string.
Definition: cdisplaystring.h:68
cDisplayString & operator=(const char *s)
Definition: cdisplaystring.h:156