Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields  

clawsoft::Tokenizer Class Reference

#include <Tokenizer.h>

Inheritance diagram for clawsoft::Tokenizer:

Inheritance graph
[legend]
Collaboration diagram for clawsoft::Tokenizer:

Collaboration graph
[legend]

Detailed Description

This utilitary class is used whenever you need to split a string into tokens iteratively.


Public Methods

 Tokenizer (char *string, char *delim)
 This constructor takes two arguments: string: is the string to be splitted delim: the delimiter.

 Tokenizer (String string, 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 Stringnext ()
 When called returns the next token in the string.

const char * getClassName ()
 Returns the name of the current class.


Static Public Methods

int installedCPUs ()
 This will return how many CPUs are installed in the system.

double cpuSpeed ()
 This will return the CPU speed in megahertz.

int totalMemory ()
 Will return the total amount of system memory.

int freeMemory ()
 Will return the total amount of free system memory.

void usleep (Uint32 usec)
 Will freeze the software for usec microseconds.


Protected Methods

char * cnext ()
 When called returns the next token in the string.

void setClassName (const char *n)
 Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.


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 str
 IS a string of the last token.


Constructor & Destructor Documentation

clawsoft::Tokenizer::Tokenizer char *    string,
char *    delim
 

This constructor takes two arguments: string: is the string to be splitted delim: the delimiter.

clawsoft::Tokenizer::Tokenizer String    string,
String    delim
 

This constructor takes two arguments: string: is the string to be splitted delim: the delimiter.

clawsoft::Tokenizer::~Tokenizer  
 

This destructor takes charge of releasing all the memory allocated by all the private members.


Member Function Documentation

char * clawsoft::Tokenizer::cnext   [protected]
 

When called returns the next token in the string.

double clawsoft::System::cpuSpeed   [static, inherited]
 

This will return the CPU speed in megahertz.

int clawsoft::System::freeMemory   [static, inherited]
 

Will return the total amount of free system memory.

const char * clawsoft::Object::getClassName   [inherited]
 

Returns the name of the current class.

int clawsoft::System::installedCPUs   [static, inherited]
 

This will return how many CPUs are installed in the system.

const String & clawsoft::Tokenizer::next  
 

When called returns the next token in the string.

void clawsoft::Object::setClassName const char *    n [protected, inherited]
 

Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.

int clawsoft::System::totalMemory   [static, inherited]
 

Will return the total amount of system memory.

void clawsoft::System::usleep Uint32    usec [static, inherited]
 

Will freeze the software for usec microseconds.


Field Documentation

char* clawsoft::Tokenizer::buffer [private]
 

Contains the string to be splitted.

char* clawsoft::Tokenizer::delim [private]
 

Stores the delimiter.

String clawsoft::Tokenizer::str [private]
 

IS a string of the last token.

char* clawsoft::Tokenizer::temp [private]
 

Reserved use.

char* clawsoft::Tokenizer::token [private]
 

Is a pointer to the las token obtained.


The documentation for this class was generated from the following files:

Authors:

Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara

Powered by:

SourceForgeLogo