ACE 8.0.0
Loading...
Searching...
No Matches
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_Treference
 
typedef const ACE_CHAR_Tpointer
 
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 ()
 Destructor.
 
int done () const
 
int next (const ACE_CHAR_T *&ch) const
 
int advance ()
 
const ACE_String_Base_Const_Iterator< ACE_CHAR_T > & operator= (const ACE_String_Base_Const_Iterator< ACE_CHAR_T > &iter)
 
const ACE_CHAR_Toperator* ()
 
ACE_String_Base_Const_Iterator< ACE_CHAR_T > & operator++ ()
 
ACE_String_Base_Const_Iterator< ACE_CHAR_Toperator++ (int)
 
ACE_String_Base_Const_Iterator< ACE_CHAR_T > & operator-- ()
 
ACE_String_Base_Const_Iterator< ACE_CHAR_Toperator-- (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.
 
size_t index_
 Current location in the string.
 

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

◆ difference_type

◆ iterator_category

template<class ACE_CHAR_T >
typedef std::bidirectional_iterator_tag ACE_String_Base_Const_Iterator< ACE_CHAR_T >::iterator_category

◆ pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ ACE_String_Base_Const_Iterator() [1/2]

Initializing constructor

Parameters
[in]strTarget string for iterator.

◆ ACE_String_Base_Const_Iterator() [2/2]

Copy constructor

Parameters
[in]iterIterator to copy.

◆ ~ACE_String_Base_Const_Iterator()

Destructor.

Member Function Documentation

◆ advance()

Move to the next character in the string.

Return values
0All characters have been seen.
1Items still remain to be seen.

◆ done()

template<class ACE_CHAR_T >
int ACE_String_Base_Const_Iterator< ACE_CHAR_T >::done ( ) const
inline

Test if the iterator has seen all characters.

Return values
0Characters still remain.
1All characters have been seen.

◆ next()

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.

◆ operator!=()

Ineqaulity comparison operator

Parameters
[in]rhsRight-hand side of operator.

◆ operator*()

Dereference operator

Returns
Reference to current character seen by iterator.

◆ operator++() [1/2]

Prefix operator

◆ operator++() [2/2]

Postfix operator

◆ operator--() [1/2]

Prefix operator

◆ operator--() [2/2]

Postfix operator

◆ operator<()

◆ operator<=()

◆ operator=()

Assignment operator

Parameters
[in]iterRight-hand side of operator.
Returns
Reference to self.

◆ operator==()

Eqaulity comparison operator

Parameters
[in]rhsRight-hand side of operator.

◆ operator>()

◆ operator>=()

Member Data Documentation

◆ index_

Current location in the string.

◆ str_

Target string to iterate over.


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