44 #ifndef CCXX_TOKENIZER_H_ 45 #define CCXX_TOKENIZER_H_ 47 #ifndef CCXX_MISSING_H_ 51 #ifndef CCXX_THREAD_H_ 55 #ifdef CCXX_NAMESPACES 138 : myTok(&tok),tokEnd(0),endp(end),token(0) {}
141 : myTok(&tok),tokEnd(0),endp(myTok->str-1),token(0) {
146 iterator() : myTok(0),start(0),tokEnd(0),endp(0),token(0) {}
150 {
if (token) *token=
'\0';
delete [] token; }
157 myTok(i.myTok),start(i.start),tokEnd(i.tokEnd),
158 endp(i.endp),token(0) {}
167 start = i.start; endp = i.endp; tokEnd = i.tokEnd;
196 {
return (tokEnd) ? *tokEnd :
'\0';}
203 inline bool operator == (
const iterator &other)
const 204 {
return (endp == other.endp);}
211 inline bool operator != (
const iterator &other)
const 212 {
return (endp != other.endp);}
262 bool skipAllDelim =
false,
306 #ifdef CCXX_NAMESPACES char nextDelimiter() const
returns the next delimiter after the current token or '\0', if there are no following delimiters...
Definition: tokenizer.h:195
#define __EXPORT
Definition: config.h:980
substitute functions which may be missing in target platform libc.
virtual ~iterator()
Definition: tokenizer.h:149
iterator begin() const
returns the begin iterator
Definition: tokenizer.h:279
Synchronization and threading services.
#define THROWS(x)
Definition: config.h:945
static const char *const SPACE
a delimiter string containing all usual whitespace delimiters.
Definition: tokenizer.h:109
const iterator & end() const
the iterator marking the end.
Definition: tokenizer.h:302
Splits delimited string into tokens.
Definition: tokenizer.h:102
iterator()
Definition: tokenizer.h:146
iterator begin(const char *d)
returns a begin iterator with an alternate set of delimiters.
Definition: tokenizer.h:293
Exception thrown, if someone tried to read beyond the end of the tokens.
Definition: tokenizer.h:121
void setDelimiters(const char *d)
changes the set of delimiters used in subsequent iterations.
Definition: tokenizer.h:286
iterator(const iterator &i)
copy constructor.
Definition: tokenizer.h:156
The input forward iterator for tokens.
Definition: tokenizer.h:127