Poster of Linux kernelThe best gift for a Linux geek
ost::StringTokenizer::iterator

ost::StringTokenizer::iterator

Section: C Library Functions (3) Updated: 16 Feb 2010
Local index Up
 

NAME

ost::StringTokenizer::iterator -

The input forward iterator for tokens.

 

SYNOPSIS


#include <tokenizer.h>  

Public Member Functions


iterator ()

virtual ~iterator ()

iterator (const iterator &i)
copy constructor.
iterator & operator= (const iterator &i)
assignment operator.
iterator & operator++ () throw ( NoSuchElementException )
shifts this iterator to the next token in the string.
const char * operator* () throw ( 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

 

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.  

const char* ost::StringTokenizer::iterator::operator* () throw ( NoSuchElementException )

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());  

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

shifts this iterator to the next token in the string.  

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

assignment operator.  

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

compares to other iterator. Usually used to compare against the end() iterator.  

Friends And Related Function Documentation

 

friend class StringTokenizer [friend]

 

Author

Generated automatically by Doxygen for GNU CommonC++ from the source code.


 

Index

NAME
SYNOPSIS
Public Member Functions
Friends
Detailed Description
Constructor & Destructor Documentation
ost::StringTokenizer::iterator::iterator () [inline]
virtual ost::StringTokenizer::iterator::~iterator () [inline, virtual]
ost::StringTokenizer::iterator::iterator (const iterator & i) [inline]
Member Function Documentation
char ost::StringTokenizer::iterator::nextDelimiter () const [inline]
bool ost::StringTokenizer::iterator::operator!= (const iterator & other) const [inline]
const char* ost::StringTokenizer::iterator::operator* () throw ( NoSuchElementException )
iterator& ost::StringTokenizer::iterator::operator++ () throw ( NoSuchElementException )
iterator& ost::StringTokenizer::iterator::operator= (const iterator & i) [inline]
bool ost::StringTokenizer::iterator::operator== (const iterator & other) const [inline]
Friends And Related Function Documentation
friend class StringTokenizer [friend]
Author

This document was created by man2html, using the manual pages.
Time: 21:51:52 GMT, April 16, 2011