gatb.core-API-0.0.0
|
String tokenizer as an Iterator. More...
#include <Tokenizer.hpp>
Public Member Functions | |
TokenizerIterator (const char *text, const char *separator) | |
virtual | ~TokenizerIterator () |
void | first () |
void | next () |
bool | isDone () |
char *& | item () |
Public Member Functions inherited from Iterator< char * > | |
char ** | operator-> () |
char *& | operator* () |
void | iterate (const Functor &f) |
virtual void | setItem (char *&i) |
bool | get (std::vector< char * > ¤t) |
virtual void | reset () |
virtual void | finalize () |
virtual std::vector< Iterator< char * > * > | getComposition () |
Public Member Functions inherited from SmartPointer | |
void | use () |
void | forget () |
Public Member Functions inherited from ISmartPointer | |
virtual | ~ISmartPointer () |
Additional Inherited Members | |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
String tokenizer as an Iterator.
Tool for tokenizing strings (like strtok) that follows our Iterator concept.
One should provide both the string to be tokenized and a string holding characters to be considered as separators.
Code sample:
TokenizerIterator | ( | const char * | text, |
const char * | separator | ||
) |
Constructors.
text | : the string to be tokenized. |
separator | : the separator characters. |
|
virtual |
Destructor.
|
virtual |
Method that initializes the iteration.
Implements Iterator< char * >.
|
inlinevirtual |
Method telling whether the iteration is finished or not.
Implements Iterator< char * >.
|
inlinevirtual |
Method that returns the current iterated item. Note that the returned type is the template type.
Implements Iterator< char * >.
|
virtual |
Method that goes to the next item in the iteration.
Implements Iterator< char * >.