SourcePro® API Reference Guide

 
List of all members | Public Types | Public Member Functions | Related Functions
RWUAvailableLocaleListIterator Class Reference

Provides a C++ Standard Library-compatible random-access iterator for class RWUAvailableLocaleList. More...

#include <rw/i18n/RWUAvailableLocaleListIterator.h>

Public Types

typedef int32_t difference_type
 
typedef std::random_access_iterator_tag iterator_category
 
typedef value_typepointer
 
typedef value_type reference
 
typedef const char * value_type
 

Public Member Functions

 RWUAvailableLocaleListIterator (void)
 
 RWUAvailableLocaleListIterator (const RWUAvailableLocaleListIterator &source)
 
 ~RWUAvailableLocaleListIterator ()
 
bool operator!= (const RWUAvailableLocaleListIterator &rhs) const
 
value_type operator* () const
 
RWUAvailableLocaleListIteratoroperator++ ()
 
RWUAvailableLocaleListIterator operator++ (int)
 
RWUAvailableLocaleListIteratoroperator+= (difference_type offset)
 
difference_type operator- (const RWUAvailableLocaleListIterator &rhs) const
 
RWUAvailableLocaleListIteratoroperator-- ()
 
RWUAvailableLocaleListIterator operator-- (int)
 
RWUAvailableLocaleListIteratoroperator-= (difference_type offset)
 
bool operator< (const RWUAvailableLocaleListIterator &rhs) const
 
bool operator<= (const RWUAvailableLocaleListIterator &rhs) const
 
RWUAvailableLocaleListIteratoroperator= (const RWUAvailableLocaleListIterator &rhs)
 
bool operator== (const RWUAvailableLocaleListIterator &rhs) const
 
bool operator> (const RWUAvailableLocaleListIterator &rhs) const
 
bool operator>= (const RWUAvailableLocaleListIterator &rhs) const
 
value_type operator[] (difference_type offset) const
 

Related Functions

(Note that these are not member functions.)

RWUAvailableLocaleListIterator operator+ (RWUAvailableLocaleListIterator::difference_type offset, const RWUAvailableLocaleListIterator &rhs)
 
RWUAvailableLocaleListIterator operator+ (const RWUAvailableLocaleListIterator &lhs, RWUAvailableLocaleListIterator::difference_type offset)
 
RWUAvailableLocaleListIterator operator- (const RWUAvailableLocaleListIterator &lhs, RWUAvailableLocaleListIterator::difference_type offset)
 

Detailed Description

RWUAvailableLocaleListIterator is a C++ Standard Library-compatible random-access iterator for class RWUAvailableLocaleList.

An instance of RWUAvailableLocaleListIterator can be used to access the list of locale names currently recognized by the Internationalization Module. The list cannot be changed at run time.

Example
#include <rw/i18n/RWUAvailableLocaleList.h>
#include <iostream>
int
main()
{
// Iterate over the list of locales and write them to
// std::cout, obtaining iterators from the static
// RWUAvailableLocaleList begin() and end() methods.
++iter)
{
std::cout << *iter << std::endl;
}
// Iterate over the list of locales again, obtaining
// iterators from an RWUAvailableLocaleList object.
for (iter = list.begin(); iter != list.end(); ++iter) {
std::cout << *iter << std::endl;
}
return 0;
}
See also
RWUAvailableLocaleList

Member Typedef Documentation

Declares an alias for the type used to represent iterator offsets and differences.

typedef std::random_access_iterator_tag RWUAvailableLocaleListIterator::iterator_category

Tags this class as a C++ Standard Library-compatible random-access iterator.

Declares an alias for the value pointer type.

Declares an alias for the value reference type.

Declares an alias for the value type returned by operator*().

Constructor & Destructor Documentation

RWUAvailableLocaleListIterator::RWUAvailableLocaleListIterator ( void  )
inline

Default constructor. Creates an invalid iterator. Attempts to dereference an invalid iterator cause an RWBoundsErr exception to be thrown. Use RWUAvailableLocaleList to obtain valid iterators.

RWUAvailableLocaleListIterator::RWUAvailableLocaleListIterator ( const RWUAvailableLocaleListIterator source)
inline

Copy constructor. Makes self a copy of source.

RWUAvailableLocaleListIterator::~RWUAvailableLocaleListIterator ( )
inline

Destructor.

Member Function Documentation

bool RWUAvailableLocaleListIterator::operator!= ( const RWUAvailableLocaleListIterator rhs) const
inline

Returns true if the list position of self is not equal to the list position of rhs; otherwise, false.

RWUAvailableLocaleListIterator::value_type RWUAvailableLocaleListIterator::operator* ( ) const
inline

Returns a const char* to a null-terminated character string containing the locale name located at the list position specified by self.

The storage for this string is owned by the library.

Exceptions
RWBoundsErrThrown if the iterator is invalid or positioned past the end of the list.
RWUAvailableLocaleListIterator & RWUAvailableLocaleListIterator::operator++ ( )
inline

Repositions self to the next position in the locale name list, and returns a reference to self.

RWUAvailableLocaleListIterator RWUAvailableLocaleListIterator::operator++ ( int  )
inline

Repositions self to the next position in the locale name list, and returns a copy of the previous value of self.

RWUAvailableLocaleListIterator & RWUAvailableLocaleListIterator::operator+= ( difference_type  offset)
inline

Repositions self to a new position in the locale name list by adding offset to the current iterator position, and returns a reference to self.

RWUAvailableLocaleListIterator::difference_type RWUAvailableLocaleListIterator::operator- ( const RWUAvailableLocaleListIterator rhs) const
inline

Returns the difference, or distance, between self and rhs.

RWUAvailableLocaleListIterator & RWUAvailableLocaleListIterator::operator-- ( )
inline

Repositions self to the preceding position in the locale name list and returns a reference to self.

RWUAvailableLocaleListIterator RWUAvailableLocaleListIterator::operator-- ( int  )
inline

Repositions self to the preceding position in the locale name list and returns a copy of the previous value of self.

RWUAvailableLocaleListIterator & RWUAvailableLocaleListIterator::operator-= ( difference_type  offset)
inline

Repositions self to a new position in the locale name list by subtracting offset from the current iterator position, and returns a reference to self.

bool RWUAvailableLocaleListIterator::operator< ( const RWUAvailableLocaleListIterator rhs) const
inline

Returns true if the list position of self is less than the list position of rhs; otherwise, false.

bool RWUAvailableLocaleListIterator::operator<= ( const RWUAvailableLocaleListIterator rhs) const
inline

Returns true if the list position of self is less than or equal to the list position of rhs; otherwise, false.

RWUAvailableLocaleListIterator & RWUAvailableLocaleListIterator::operator= ( const RWUAvailableLocaleListIterator rhs)
inline

Changes the state of self to match that of rhs. Makes the list position of self equal to the list position of rhs.

bool RWUAvailableLocaleListIterator::operator== ( const RWUAvailableLocaleListIterator rhs) const
inline

Returns true if the list position of self is equal to the list position of rhs; otherwise, false.

bool RWUAvailableLocaleListIterator::operator> ( const RWUAvailableLocaleListIterator rhs) const
inline

Returns true if the list position of self is greater than the list position of rhs; otherwise, false.

bool RWUAvailableLocaleListIterator::operator>= ( const RWUAvailableLocaleListIterator rhs) const
inline

Returns true if the list position of self is greater than or equal to the list position of rhs; otherwise, false.

RWUAvailableLocaleListIterator::value_type RWUAvailableLocaleListIterator::operator[] ( difference_type  offset) const
inline

Returns a const char* to a null-terminated character string that contains the name of the locale located at the list position specified by the given offset from self.

Friends And Related Function Documentation

Returns a new iterator whose list position is calculated by adding offset to the position of rhs.

Returns a new iterator whose list position is calculated by adding offset to the position of lhs.

Returns a new iterator whose list position is calculated by subtracting offset from the position of lhs.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.