ACE  6.3.3
Public Types | Public Member Functions | Private Attributes | List of all members
ACE_String_Base_Const_Iterator< ACE_CHAR_T > Class Template Reference

Const iterator class for the ACE_String_Base class. More...

#include <String_Base.h>

Public Types

typedef std::bidirectional_iterator_tag iterator_category
 
typedef const ACE_CHAR_T value_type
 
typedef const ACE_CHAR_T & reference
 
typedef const ACE_CHAR_T * pointer
 
typedef ptrdiff_t difference_type
 

Public Member Functions

 ACE_String_Base_Const_Iterator (const ACE_String_Base< ACE_CHAR_T > &str, int end=0)
 
 ACE_String_Base_Const_Iterator (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &iter)
 
 ~ACE_String_Base_Const_Iterator (void)
 Destructor. More...
 
int done (void) const
 
int next (const ACE_CHAR_T *&ch) const
 
int advance (void)
 
const ACE_String_Base_Const_Iterator< ACE_CHAR_T > & operator= (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &iter)
 
const ACE_CHAR_T & operator* (void)
 
ACE_String_Base_Const_Iterator< ACE_CHAR_T > & operator++ (void)
 
ACE_String_Base_Const_Iterator< ACE_CHAR_T > operator++ (int)
 
ACE_String_Base_Const_Iterator< ACE_CHAR_T > & operator-- (void)
 
ACE_String_Base_Const_Iterator< ACE_CHAR_T > operator-- (int)
 
bool operator== (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &rhs) const
 
bool operator!= (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &rhs) const
 
bool operator< (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &rhs) const
 
bool operator> (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &rhs) const
 
bool operator<= (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &rhs) const
 
bool operator>= (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &rhs) const
 

Private Attributes

const ACE_String_Base< ACE_CHAR_T > * str_
 Target string to iterate over. More...
 
size_t index_
 Current location in the string. More...
 

Detailed Description

template<class ACE_CHAR_T>
class ACE_String_Base_Const_Iterator< ACE_CHAR_T >

Const iterator class for the ACE_String_Base class.

This class is an implementation of an iterator that allows client applications it iterator over the contents of a string. Currently, now this iterator fall under the std::bidirectional_iterator_tag category. Future versions of the class will support the operations of std::random_access_iterator_tag.

Member Typedef Documentation

template<class ACE_CHAR_T >
typedef ptrdiff_t ACE_String_Base_Const_Iterator< ACE_CHAR_T >::difference_type
template<class ACE_CHAR_T >
typedef std::bidirectional_iterator_tag ACE_String_Base_Const_Iterator< ACE_CHAR_T >::iterator_category
template<class ACE_CHAR_T >
typedef const ACE_CHAR_T* ACE_String_Base_Const_Iterator< ACE_CHAR_T >::pointer
template<class ACE_CHAR_T >
typedef const ACE_CHAR_T& ACE_String_Base_Const_Iterator< ACE_CHAR_T >::reference
template<class ACE_CHAR_T >
typedef const ACE_CHAR_T ACE_String_Base_Const_Iterator< ACE_CHAR_T >::value_type

Constructor & Destructor Documentation

template<class ACE_CHAR_T >
ACE_String_Base_Const_Iterator< ACE_CHAR_T >::ACE_String_Base_Const_Iterator ( const ACE_String_Base< ACE_CHAR_T > &  str,
int  end = 0 
)
inline

Initializing constructor

Parameters
[in]strTarget string for iterator.
template<class ACE_CHAR_T >
ACE_String_Base_Const_Iterator< ACE_CHAR_T >::ACE_String_Base_Const_Iterator ( const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &  iter)
inline

Copy constructor

Parameters
[in]iterIterator to copy.
template<class ACE_CHAR_T >
ACE_String_Base_Const_Iterator< ACE_CHAR_T >::~ACE_String_Base_Const_Iterator ( void  )
inline

Destructor.

Member Function Documentation

template<class ACE_CHAR_T >
int ACE_String_Base_Const_Iterator< ACE_CHAR_T >::advance ( void  )

Move to the next character in the string.

Return values
0All characters have been seen.
1Items still remain to be seen.
template<class ACE_CHAR_T >
int ACE_String_Base_Const_Iterator< ACE_CHAR_T >::done ( void  ) const
inline

Test if the iterator has seen all characters.

Return values
0Characters still remain.
1All characters have been seen.
template<class ACE_CHAR_T >
int ACE_String_Base_Const_Iterator< ACE_CHAR_T >::next ( const ACE_CHAR_T *&  ch) const

Get the current character.

Parameters
[out]chThe current character.
Return values
0All characters have been seen.
1Items still remain to be seen.
template<class ACE_CHAR_T >
bool ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator!= ( const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &  rhs) const
inline

Ineqaulity comparison operator

Parameters
[in]rhsRight-hand side of operator.
template<class ACE_CHAR_T >
const ACE_CHAR_T & ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator* ( void  )
inline

Dereference operator

Returns
Reference to current character seen by iterator.
template<class ACE_CHAR_T >
ACE_String_Base_Const_Iterator< ACE_CHAR_T > & ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator++ ( void  )
inline

Prefix operator

template<class ACE_CHAR_T >
ACE_String_Base_Const_Iterator< ACE_CHAR_T > ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator++ ( int  )
inline

Postfix operator

template<class ACE_CHAR_T >
ACE_String_Base_Const_Iterator< ACE_CHAR_T > & ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator-- ( void  )
inline

Prefix operator

template<class ACE_CHAR_T >
ACE_String_Base_Const_Iterator< ACE_CHAR_T > ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator-- ( int  )
inline

Postfix operator

template<class ACE_CHAR_T >
bool ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator< ( const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &  rhs) const
inline
template<class ACE_CHAR_T >
bool ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator<= ( const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &  rhs) const
inline
template<class ACE_CHAR_T >
const ACE_String_Base_Const_Iterator< ACE_CHAR_T > & ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator= ( const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &  iter)

Assignment operator

Parameters
[in]iterRight-hand side of operator.
Returns
Reference to self.
template<class ACE_CHAR_T >
bool ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator== ( const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &  rhs) const
inline

Eqaulity comparison operator

Parameters
[in]rhsRight-hand side of operator.
template<class ACE_CHAR_T >
bool ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator> ( const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &  rhs) const
inline
template<class ACE_CHAR_T >
bool ACE_String_Base_Const_Iterator< ACE_CHAR_T >::operator>= ( const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &  rhs) const
inline

Member Data Documentation

template<class ACE_CHAR_T >
size_t ACE_String_Base_Const_Iterator< ACE_CHAR_T >::index_
private

Current location in the string.

template<class ACE_CHAR_T >
const ACE_String_Base<ACE_CHAR_T>* ACE_String_Base_Const_Iterator< ACE_CHAR_T >::str_
private

Target string to iterate over.


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