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();}
175 void set(
const char *displaystr) {
parse(displaystr);}
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);
298 bool setTagArg(
int tagindex,
int index,
const char *value);
Common base for module and channel classes.
Definition ccomponent.h:51
cDisplayString & operator=(const char *s)
Definition cdisplaystring.h:156
int getNumArgs(const char *tagname) const
cDisplayString(const char *dispstr)
int getNumArgs(int tagindex) const
bool setTagArg(const char *tagname, int index, long value)
bool containsTag(const char *tagname) const
cDisplayString(const cDisplayString &ds)
bool removeTag(int tagindex)
bool removeTag(const char *tagname)
void parse(const char *displaystr)
const char * getTagArg(const char *tagname, int index) const
void set(const char *displaystr)
Definition cdisplaystring.h:175
void updateWith(const cDisplayString &ds)
int getTagIndex(const char *tagname) const
bool setTagArg(const char *tagname, int index, const char *value)
const char * getTagName(int tagindex) const
cDisplayString()
Definition cdisplaystring.h:126
int insertTag(const char *tagname, int atindex=0)
void updateWith(const char *s)
bool setTagArg(int tagindex, int index, const char *value)
const char * getTagArg(int tagindex, int index) const
cDisplayString & operator=(const cDisplayString &ds)