#include <cmnTokenizer.h>
Collaboration diagram for cmnTokenizer:

Delimiters: Separate tokens. A sequence of delimiters which is not quoted or escaped is ignored, and a new token begins after it.
Quote markers: Enclose parts of, or complete, tokens. Anything between a pair of identical quote markers is included in a token.
Escape markers: Quote the character immediately following them.
The default values for delimiters is whitespace (space, tab, CR); for quote markers is the set of double and single quotation marks (",'); for escape markers is backslash (\). But the user can override them by calling the appropriate method.
A cmnTokenizer object maintains an internal copy of the tokenized text, and can return a pointer to an array of pointer, after the fashion of argv.
Definition at line 66 of file cmnTokenizer.h.
| void cmnTokenizer::Parse | ( | const char * | string | ) | throw (std::runtime_error) |
Parse the input string and store the tokens internally. If there is a syntax error (e.g., unclosed quotes) throw an exception.
| string | the text to be parsed. |
| size_type cmnTokenizer::GetNumTokens | ( | void | ) | const [inline] |
Return the number of tokens stored.
Definition at line 136 of file cmnTokenizer.h.
| const char* const* cmnTokenizer::GetTokensArray | ( | void | ) | const [inline] |
Return the array of tokens in an argv fashion.
Definition at line 151 of file cmnTokenizer.h.
| void cmnTokenizer::GetArgvTokens | ( | std::vector< const char * > & | argvTokens | ) | const |
This method will fill the input vector with the tokens, but first set the 0-index element to NULL, to follow the argv convention, where argv[0] contains the "name of the program".