ost::StringTokenizer::iterator Class Reference

The input forward iterator for tokens. More...

#include <tokenizer.h>

List of all members.

Public Member Functions

 iterator ()
virtual ~iterator ()
 iterator (const iterator &i)
 copy constructor.
iteratoroperator= (const iterator &i)
 assignment operator.
iteratoroperator++ () 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.
char nextDelimiter () const
 returns the next delimiter after the current token or '\0', if there are no following delimiters.
bool operator== (const iterator &other) const
 compares to other iterator.
bool operator!= (const iterator &other) const
 compares to other iterator.

Friends

class StringTokenizer


Detailed Description

The input forward iterator for tokens.

Author:
Henner Zeller

Constructor & Destructor Documentation

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

virtual ost::StringTokenizer::iterator::~iterator (  )  [inline, virtual]

ost::StringTokenizer::iterator::iterator ( const iterator i  )  [inline]

copy constructor.


Member Function Documentation

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

assignment operator.

References endp, myTok, start, and tokEnd.

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

shifts this iterator to the next token in the string.

const char* ost::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());

char ost::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).

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

compares to other iterator.

Usually used to compare against the end() iterator.

References endp.

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

compares to other iterator.

Usually used to compare against the end() iterator.

References endp.


Friends And Related Function Documentation

friend class StringTokenizer [friend]


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

Generated on Fri Jan 8 01:25:57 2016 for GNU CommonC++ by  doxygen 1.5.6