Google

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

StringTokenizer::iterator Class Reference

The input forward iterator for tokens. More...

#include <misc.h>

List of all members.

Public Methods

 iterator ()
 ~iterator ()
 iterator (const iterator& i)
 copy constructor.

iterator& operator= (const iterator &i)
 assignment operator.

iterator& operator++ () THROWS (NoSuchElementException)
 shifts this iterator to the next token in the string.

const char* operator * () THROWS (NoSuchElementException)
 returns the immutable string this iterator points to or '0' if no token is available (i.e. More...

char nextDelimiter () const
 returns the next delimiter after the current token or '\0', if there are no following delimiters. More...

bool operator== (const iterator &other) const
 compares to other iterator. More...

bool operator!= (const iterator &other) const
 compares to other iterator. More...


Detailed Description

The input forward iterator for tokens.

Author(s):
Henner Zeller


Constructor & Destructor Documentation

StringTokenizer::iterator::iterator ( )
 

StringTokenizer::iterator::~iterator ( ) [inline]
 

StringTokenizer::iterator::iterator ( const iterator & i )
 

copy constructor.


Member Function Documentation

char StringTokenizer::iterator::nextDelimiter ( ) const [inline]
 

returns the next delimiter after the current token or '\0', if there are no following delimiters.

It returns the very next delimiter (even if skipAllDelim=true).

const char * StringTokenizer::iterator::operator * ( )
 

returns the immutable string this iterator points to or '0' if no token is available (i.e.

i == end()). Do not store pointers to this token, since it is invalidated for each iteration. If you need the token, copy it (e.g. with strdup());

bool StringTokenizer::iterator::operator!= ( const iterator & other ) const [inline]
 

compares to other iterator.

Usually used to compare against the end() iterator.

iterator & StringTokenizer::iterator::operator++ ( void )
 

shifts this iterator to the next token in the string.

iterator & StringTokenizer::iterator::operator= ( const iterator & i ) [inline]
 

assignment operator.

bool StringTokenizer::iterator::operator== ( const iterator & other ) const [inline]
 

compares to other iterator.

Usually used to compare against the end() iterator.


The documentation for this class was generated from the following file:
Generated at Fri Mar 23 10:47:55 2001 for CommonC++ by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000