#include <Tokenizer.h>
Definition at line 26 of file Tokenizer.h.
Public Member Functions | |
Tokenizer (char *string, char *delim) | |
This constructor takes two arguments: string: is the string to be splitted delim: the delimiter. | |
Tokenizer (const String &string, const String &delim) | |
This constructor takes two arguments: string: is the string to be splitted delim: the delimiter. | |
~Tokenizer () | |
This destructor takes charge of releasing all the memory allocated by all the private members. | |
const String & | next () |
When called returns the next token in the string, if there are not any more tokens, then this method will throw a NoMoreTokens exception. | |
bool | finished () |
Call this method in order to know if there are any more tokens to read. | |
virtual const char * | getClassName () |
Returns the name of the current class. | |
virtual std::string | toString () |
Static Public Member Functions | |
static void | usleep (UInt32 usec) |
This will return how many CPUs are installed in the system. | |
static void | debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Will print a debug message to the screen. | |
static void | debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Protected Member Functions | |
char * | cnext () |
When called returns the next token in the string. | |
Protected Attributes | |
std::string | __cls_name |
Private Attributes | |
char * | temp |
Reserved use. | |
char * | buffer |
Contains the string to be splitted. | |
char * | token |
Is a pointer to the las token obtained. | |
char * | delim |
Stores the delimiter. | |
String | tstr |
Stores a temporal copy of buffer as a String. | |
bool | _fin |
Flag to say if there are more tokens or not. | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Object &s) |
xvr2::Tokenizer::Tokenizer | ( | char * | string, | |
char * | delim | |||
) |
This constructor takes two arguments: string: is the string to be splitted delim: the delimiter.
This constructor takes two arguments: string: is the string to be splitted delim: the delimiter.
xvr2::Tokenizer::~Tokenizer | ( | ) |
This destructor takes charge of releasing all the memory allocated by all the private members.
char* xvr2::Tokenizer::cnext | ( | ) | [protected] |
When called returns the next token in the string.
const String& xvr2::Tokenizer::next | ( | ) |
When called returns the next token in the string, if there are not any more tokens, then this method will throw a NoMoreTokens exception.
bool xvr2::Tokenizer::finished | ( | ) |
Call this method in order to know if there are any more tokens to read.
static void xvr2::System::usleep | ( | UInt32 | usec | ) | [static, inherited] |
This will return how many CPUs are installed in the system.
This will return the CPU speed in megahertz Will return the total amount of system memory Will return the total amount of free system memory Will freeze the software for usec microseconds
virtual const char* xvr2::Object::getClassName | ( | ) | [virtual, inherited] |
Returns the name of the current class.
static void xvr2::Object::debugmsg | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
Will print a debug message to the screen.
static void xvr2::Object::debugmsgln | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
virtual std::string xvr2::Object::toString | ( | ) | [virtual, inherited] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const Object & | s | |||
) | [friend, inherited] |
char* xvr2::Tokenizer::temp [private] |
char* xvr2::Tokenizer::buffer [private] |
char* xvr2::Tokenizer::token [private] |
char* xvr2::Tokenizer::delim [private] |
String xvr2::Tokenizer::tstr [private] |
bool xvr2::Tokenizer::_fin [private] |
std::string xvr2::Object::__cls_name [protected, inherited] |