#include <XFuTokenizer.h>
Public Member Functions | |
XFuTokenizer () | |
Constructor. | |
~XFuTokenizer () | |
Destructor. | |
void | tokenize (const CHAR *aBuffer, const CHAR *aSeparators) |
Tokenizes the input string. | |
void | tokenize (const CHAR *aBuffer) |
Tokenizes the input string. | |
INT | tokenEquals (INT32 aIdx, const CHAR *aCompareString) |
Case sensitive matching of a token and given string. | |
INT | tokenEqualsNocase (INT32 aIdx, const CHAR *aCompareString) |
Case insensitive matching of a token and given string. | |
INT32 | getTokenCount () |
Get the token count. | |
const CHAR * | getToken (INT32 aIdx) |
Get a pointer to a token (as zero-terminated string). | |
CHAR * | duplicateToken (INT32 aIdx) |
Get a duplicate of a token (as zero-terminated string). | |
Private Member Functions | |
CHAR | upcase (CHAR i) |
Upcase function. | |
Private Attributes | |
CHAR ** | mData |
Token strings. | |
INT32 | mCount |
Number of token strings. |
Tokenizes strings by delimiters.
const CHAR blah[] = "some; string with ; different tokens"; XFuTokenizer myTokens; myTokens.tokenize(blah, XFCSTR(";")); INT i; for (i = 0; i < myTokens.getTokenCount(); ++i) if (myTokens.tokenEqualsNocase(i, XFCSTR("String wIth"))) printf("token number %d is our token", i);
Definition at line 31 of file XFuTokenizer.h.
|
Constructor.
Definition at line 18 of file XFuTokenizer.cpp. |
|
Destructor.
Definition at line 26 of file XFuTokenizer.cpp. |
|
Get a duplicate of a token (as zero-terminated string).
Definition at line 191 of file XFuTokenizer.cpp. References mData. |
|
Get a pointer to a token (as zero-terminated string).
Definition at line 184 of file XFuTokenizer.cpp. References mData. Referenced by XFuConfigurationData::addMusic(), XFuConfigurationData::addSound(), XFuConfigurationData::loadImage(), XFuConfigurationData::loadPrinter(), XFuConfigurationData::parseRectangleString(), XFuConfigurationData::put(), tokenEquals(), and tokenEqualsNocase(). |
|
Get the token count.
Definition at line 177 of file XFuTokenizer.cpp. References mCount. Referenced by XFuConfigurationData::addMusic(), XFuConfigurationData::addSound(), XFuConfigurationData::loadImage(), XFuConfigurationData::loadPrinter(), XFuConfigurationData::parseRectangleString(), and XFuConfigurationData::put(). |
|
Case sensitive matching of a token and given string.
Definition at line 149 of file XFuTokenizer.cpp. References getToken(). |
|
Case insensitive matching of a token and given string.
Definition at line 163 of file XFuTokenizer.cpp. References getToken(), and upcase(). |
|
Tokenizes the input string. Uses the ',' and '=' characters as delimiters for tokens. Definition at line 142 of file XFuTokenizer.cpp. References tokenize(). |
|
Tokenizes the input string. Uses the characters in aSeparators as delimiters for tokens. Definition at line 36 of file XFuTokenizer.cpp. Referenced by XFuConfigurationData::addMusic(), XFuConfigurationData::addSound(), XFuConfigurationData::loadImage(), XFuConfigurationData::loadPrinter(), XFuConfigurationData::parseRectangleString(), XFuConfigurationData::put(), and tokenize(). |
|
Upcase function.
Definition at line 204 of file XFuTokenizer.cpp. Referenced by tokenEqualsNocase(). |
|
Number of token strings.
Definition at line 69 of file XFuTokenizer.h. Referenced by getTokenCount(), tokenize(), XFuTokenizer(), and ~XFuTokenizer(). |
|
Token strings.
Definition at line 67 of file XFuTokenizer.h. Referenced by duplicateToken(), getToken(), tokenize(), XFuTokenizer(), and ~XFuTokenizer(). |
![]() | ||||
![]() |
Confidential Copyright © 2002-2003 Fathammer | with doxygen by Dimitri van Heesch |