namespace Akenti class StreamTokenizer

This a simple stream tokenizer

Public Methods

StreamTokenizer (istream& source, const string& delimiters = "\t\n\r\f ", bool retTokens = false)
Constructs this object
bool hasMoreTokens ()
Returns true if the tokenizer has more tokens
string nextToken ()
Returns the next token
string nextToken (const string& delimiters)
Returns the next token
string paramString () const
Prints the data member for StreamTokenizer using the format [nameOfDataMember="valueOfDataMember",

Documentation

This a simple stream tokenizer. Note that the stream object used to instantiate this object must outlive this object. This is because streams cannot be copied or assigned.
StreamTokenizer(istream& source, const string& delimiters = "\t\n\r\f ", bool retTokens = false)
Constructs this object. The default deimiters are any white space characters. By default the delimiters are not returned as tokens.
Parameters:
source - an input stream
delimiters - the set of delimiters used to parse the stream
retTokens - if true the delimiters are returned as a token, if false they are not.

bool hasMoreTokens()
Returns true if the tokenizer has more tokens.
Returns:
true if there are more tokens, false otherwise

string nextToken()
Returns the next token.
Throws:
Error if there are no more tokens
Returns:
the next token

string nextToken(const string& delimiters)
Returns the next token. The new set of delimiters replaces the old one.
Throws:
Error if there are no more tokens
Returns:
the next token
Parameters:
delimiters - the new set of delimiters use to parse the stream
See Also:
nextToken()

string paramString() const
Prints the data member for StreamTokenizer using the format [nameOfDataMember="valueOfDataMember",...]. The source data member was left out since it is a stream.
Returns:
the string format as shown above


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari
Version:
1.1 00/05/01

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de