SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Provides a C++ Standard Library bidirectional iterator for class RWUAvailableLocaleList. More...
#include <rw/i18n/RWUAvailableLocaleListIterator.h>
RWUAvailableLocaleListIterator is a C++ Standard Library bidirectional 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.
#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. RWUAvailableLocaleList::const_iterator iter; for (iter = RWUAvailableLocaleList::begin(); iter != RWUAvailableLocaleList::end(); ++iter) { std::cout << *iter << std::endl; } // Iterate over the list of locales again, obtaining // iterators from an RWUAvailableLocaleList object. RWUAvailableLocaleList list; for (iter = list.begin(); iter != list.end(); ++iter) { std::cout << *iter << std::endl; } return 0; }
typedef int32_t RWUAvailableLocaleListIterator::difference_type |
Declares a conventional Standard C++ alias for the type used to represent iterator offsets and differences.
typedef std::bidirectional_iterator_tag RWUAvailableLocaleListIterator::iterator_category |
Tags this class as a Standard C++ bidirectional iterator.
Declares a conventional Standard C++ alias for the value pointer type.
Declares a conventional Standard C++ alias for the value reference type.
typedef const char* RWUAvailableLocaleListIterator::value_type |
Declares a conventional Standard C++ alias for the value type returned by operator*().
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.
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.
RWBoundsErr | Thrown if the iterator is invalid or positioned past the end of the list. |
RWUAvailableLocaleListIterator RWUAvailableLocaleListIterator::operator++ | ( | int | ) | [inline] |
Repositions self to the next position in the locale name list, and returns a new iterator that points to the old position. If self is equal to RWUAvailableLocaleList::end(), its position is left unchanged.
RWUAvailableLocaleListIterator & RWUAvailableLocaleListIterator::operator++ | ( | ) | [inline] |
Repositions self to the next position in the locale name list, and returns a reference to self. If self is equal to RWUAvailableLocaleList::end(), its position is left unchanged.
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.
If the new position is less than the position given by RWUAvailableLocaleList::begin(), self is positioned at RWUAvailableLocaleList::begin(). If the new position is greater than the position given by RWUAvailableLocaleList::end(), self is positioned at RWUAvailableLocaleList::end().
RWUAvailableLocaleListIterator::difference_type RWUAvailableLocaleListIterator::operator- | ( | const RWUAvailableLocaleListIterator & | rhs | ) | const [inline] |
Returns the difference, or distance, between self and rhs.
RWUAvailableLocaleListIterator RWUAvailableLocaleListIterator::operator-- | ( | int | ) | [inline] |
Repositions self to the previous position in the locale name list, and returns a new iterator that points to the old position. If self is equal to RWUAvailableLocaleList::begin(), its position is left unchanged.
RWUAvailableLocaleListIterator & RWUAvailableLocaleListIterator::operator-- | ( | ) | [inline] |
Repositions self to the previous position in the locale name list, and returns a reference to self. If self is equal to RWUAvailableLocaleList::begin(), its position is left unchanged.
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.
If the new position is less than the position given by RWUAvailableLocaleList::begin(), self is positioned at RWUAvailableLocaleList::begin(). If the new position is greater than the position given by RWUAvailableLocaleList::end(), self is positioned at RWUAvailableLocaleList::end().
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 operator+ | ( | const RWUAvailableLocaleListIterator & | lhs, | |
RWUAvailableLocaleListIterator::difference_type | offset | |||
) | [related] |
Returns a new iterator whose list position is calculated by adding offset to the position of lhs. If the position of the new iterator is less than the position given by RWUAvailableLocaleList::begin(), the iterator is positioned at RWUAvailableLocaleList::begin(). If the position of the new iterator is greater than the position given by RWUAvailableLocaleList::end(), the iterator is positioned at RWUAvailableLocaleList::end().
RWUAvailableLocaleListIterator operator+ | ( | RWUAvailableLocaleListIterator::difference_type | offset, | |
const RWUAvailableLocaleListIterator & | rhs | |||
) | [related] |
Returns a new iterator whose list position is calculated by adding offset to the position of rhs. If the position of the new iterator is less than the position given by RWUAvailableLocaleList::begin(), the iterator is positioned at RWUAvailableLocaleList::begin(). If the position of the new iterator is greater than the position given by RWUAvailableLocaleList::end(), the iterator is positioned at RWUAvailableLocaleList::end().
RWUAvailableLocaleListIterator operator- | ( | const RWUAvailableLocaleListIterator & | lhs, | |
RWUAvailableLocaleListIterator::difference_type | offset | |||
) | [related] |
Returns a new iterator whose list position is calculated by subtracting offset from the position of lhs. If the position of the new iterator is less than the position given by RWUAvailableLocaleList::begin(), the iterator is positioned at RWUAvailableLocaleList::begin(). If the position of the new iterator is greater than the position given by RWUAvailableLocaleList::end(), the iterator is positioned at RWUAvailableLocaleList::end().
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.