textwolf  0.2
Public Member Functions | List of all members
textwolf::CStringIterator Class Reference

Input iterator on a constant string returning null characters after EOF as required by textwolf scanners. More...

#include <cstringiterator.hpp>

Public Member Functions

 CStringIterator ()
 Default constructor. More...
 
 CStringIterator (const char *src, unsigned int size)
 Constructor. More...
 
 CStringIterator (const char *src)
 Constructor. More...
 
 CStringIterator (const std::string &src)
 Constructor. More...
 
 CStringIterator (const CStringIterator &o)
 Copy constructor. More...
 
char operator* ()
 Element access. More...
 
CStringIteratoroperator++ ()
 Preincrement. More...
 
unsigned int pos () const
 Return current char position. More...
 
void pos (unsigned int i)
 Set current char position. More...
 
int operator- (const CStringIterator &o) const
 

Detailed Description

Input iterator on a constant string returning null characters after EOF as required by textwolf scanners.

Constructor & Destructor Documentation

textwolf::CStringIterator::CStringIterator ( )
inline

Default constructor.

textwolf::CStringIterator::CStringIterator ( const char *  src,
unsigned int  size 
)
inline

Constructor.

Parameters
[in]srcnull terminated C string to iterate on
[in]sizenumber of bytes in the string to iterate on
textwolf::CStringIterator::CStringIterator ( const char *  src)
inline

Constructor.

Parameters
[in]srcstring to iterate on
textwolf::CStringIterator::CStringIterator ( const std::string &  src)
inline

Constructor.

Parameters
[in]srcstring to iterate on
textwolf::CStringIterator::CStringIterator ( const CStringIterator o)
inline

Copy constructor.

Parameters
[in]oiterator to copy

Member Function Documentation

char textwolf::CStringIterator::operator* ( )
inline

Element access.

Returns
current character
CStringIterator& textwolf::CStringIterator::operator++ ( )
inline

Preincrement.

int textwolf::CStringIterator::operator- ( const CStringIterator o) const
inline
unsigned int textwolf::CStringIterator::pos ( ) const
inline

Return current char position.

void textwolf::CStringIterator::pos ( unsigned int  i)
inline

Set current char position.


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