Main Page   Packages   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

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.

Definition at line 15 of file Tokenizer.h.

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.

Stringnext ()
 When called returns the next token in the string.

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


Protected Methods

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

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


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.

Definition at line 11 of file Tokenizer.cpp.

References clawsoft.Tokenizer.buffer, clawsoft.Tokenizer.delim, clawsoft.Tokenizer.temp, and clawsoft.Tokenizer.token.

clawsoft.Tokenizer::Tokenizer String    string,
String    delim
 

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

Definition at line 19 of file Tokenizer.cpp.

References clawsoft.Tokenizer.buffer, clawsoft.Tokenizer.delim, clawsoft.Tokenizer.temp, clawsoft.String.toCharPtr(), and clawsoft.Tokenizer.token.

clawsoft.Tokenizer::~Tokenizer  
 

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

Definition at line 27 of file Tokenizer.cpp.

References clawsoft.Tokenizer.buffer, clawsoft.Tokenizer.delim, clawsoft.Tokenizer.temp, and clawsoft.Tokenizer.token.


Member Function Documentation

char * clawsoft.Tokenizer::cnext   [protected]
 

When called returns the next token in the string.

Definition at line 38 of file Tokenizer.cpp.

References clawsoft.Tokenizer.buffer, clawsoft.Tokenizer.delim, clawsoft.Tokenizer.temp, and clawsoft.Tokenizer.token.

Referenced by clawsoft.Tokenizer.next().

char * clawsoft.Object::getClassName   [inherited]
 

Returns the name of the current class.

Definition at line 18 of file Object.cpp.

References clawsoft.Object.__cls_name.

String & clawsoft.Tokenizer::next  
 

When called returns the next token in the string.

Definition at line 88 of file Tokenizer.cpp.

References clawsoft.Tokenizer.cnext(), and clawsoft.Tokenizer.str.

Referenced by clawsoft.Font.renderText().

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

Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.

Definition at line 14 of file Object.cpp.

References clawsoft.Object.__cls_name.

Referenced by clawsoft.ArrayOutOfBoundsException.ArrayOutOfBoundsException(), clawsoft.BrokenPipeException.BrokenPipeException(), clawsoft.Dialog.CancelButton.CancelButton(), clawsoft.CantLoadDSOException.CantLoadDSOException(), clawsoft.CantUnloadDSOException.CantUnloadDSOException(), clawsoft.ConnectionRefusedException.ConnectionRefusedException(), clawsoft.ConnectionTimeoutException.ConnectionTimeoutException(), clawsoft.Dialog.Dialog(), clawsoft.DSOException.DSOException(), clawsoft.DSOSymbolException.DSOSymbolException(), clawsoft.ElementNotFoundException.ElementNotFoundException(), clawsoft.Font.Font(), clawsoft.GameSelector.GameSelector(), clawsoft.Dialog.HelpButton.HelpButton(), clawsoft.IOException.IOException(), clawsoft.KeyboardEvent.KeyboardEvent(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Mutex.Mutex(), clawsoft.MutexException.MutexException(), clawsoft.NetworkException.NetworkException(), clawsoft.NetworkUnreachableException.NetworkUnreachableException(), clawsoft.NoMoreTokensException.NoMoreTokensException(), clawsoft.NullPointerException.NullPointerException(), clawsoft.NumberException.NumberException(), clawsoft.Object.Object(), clawsoft.Dialog.OKButton.OKButton(), clawsoft.Plugin.Plugin(), clawsoft.ProcOutOfFileDescriptorsException.ProcOutOfFileDescriptorsException(), Random.Random(), clawsoft.ServerSocket.ServerSocket(), clawsoft.Socket.Socket(), clawsoft.SocketAlreadyBoundedException.SocketAlreadyBoundedException(), clawsoft.SocketAlreadyUsedException.SocketAlreadyUsedException(), clawsoft.SocketUnableToReadException.SocketUnableToReadException(), clawsoft.SocketUnableToWriteException.SocketUnableToWriteException(), clawsoft.SysOutOfFileDescriptorsException.SysOutOfFileDescriptorsException(), clawsoft.TextBox.TextBox(), clawsoft.TextButton.TextButton(), clawsoft.TextField.TextField(), clawsoft.Thread.Thread(), clawsoft.UnableToLockMutexException.UnableToLockMutexException(), clawsoft.UnableToUnlockMutexException.UnableToUnlockMutexException(), and clawsoft.Window.Window().


Field Documentation

char* clawsoft.Tokenizer.buffer [private]
 

Contains the string to be splitted.

Definition at line 20 of file Tokenizer.h.

Referenced by clawsoft.Tokenizer.cnext(), clawsoft.Tokenizer.Tokenizer(), and clawsoft.Tokenizer.~Tokenizer().

char* clawsoft.Tokenizer.delim [private]
 

Stores the delimiter.

Definition at line 24 of file Tokenizer.h.

Referenced by clawsoft.Tokenizer.cnext(), clawsoft.Tokenizer.Tokenizer(), and clawsoft.Tokenizer.~Tokenizer().

String clawsoft.Tokenizer.str [private]
 

IS a string of the last token.

Definition at line 26 of file Tokenizer.h.

Referenced by clawsoft.Tokenizer.next().

char* clawsoft.Tokenizer.temp [private]
 

Reserved use.

Definition at line 18 of file Tokenizer.h.

Referenced by clawsoft.Tokenizer.cnext(), clawsoft.Tokenizer.Tokenizer(), and clawsoft.Tokenizer.~Tokenizer().

char* clawsoft.Tokenizer.token [private]
 

Is a pointer to the las token obtained.

Definition at line 22 of file Tokenizer.h.

Referenced by clawsoft.Tokenizer.cnext(), clawsoft.Tokenizer.Tokenizer(), and clawsoft.Tokenizer.~Tokenizer().


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

Powered by:

SourceForge Logo