Module: Internationalization Module Group: Character Encoding Scheme Conversion
Does Not Inherit
#include <rw/i18n/RWUAvailableEncodingListIterator.h>
RWUAvailableEncodingListIterator is a Standard C++ bidirectional iterator for class RWUAvailableEncodingList. An instance of RWUAvailableEncodingListIterator can be used to access the list of encoding names currently recognized by the Internationalization Module. The list cannot be changed at run time.
#include <rw/i18n/RWUAvailableEncodingList.h> #include <iostream> int main() { // Iterate over the list of encodings and write them // to std::cout, obtaining iterators from the static // RWUAvailableEncodingList begin() and end() methods. RWUAvailableEncodingList::const_iterator iter; for (iter = RWUAvailableEncodingList::begin(); iter != RWUAvailableEncodingList::end(); ++iter) { std::cout << *iter << std::endl; } // Iterate over the list of encodings again, obtaining // iterators from an RWUAvailableEncodingList object. RWUAvailableEncodingList list; for (iter = list.begin(); iter != list.end(); ++iter) { std::cout << *iter << std::endl; } return 0; }
typedef int32_t difference_type;
Declares a conventional Standard C++ alias for the type used to represent iterator offsets and differences.
typedef RW_SL_STD(bidirectional_iterator_tag) iterator_category;
Tags this class as a Standard C++ bidirectional iterator.
typedef const value_type* pointer;
Declares a conventional Standard C++ alias for the value pointer type.
typedef const value_type& reference;
Declares a conventional Standard C++ alias for the value reference type.
typedef const char* value_type;
Declares a conventional Standard C++ alias for the value type returned by operator*().
RWUAvailableEncodingListIterator operator+( RWUAvailableEncodingListIterator::difference_type offset, const RWUAvailableEncodingListIterator& rhs);
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 RWUAvailableEncodingList::begin(), the iterator is positioned at begin(). If the position of the new iterator is greater than the position given by RWUAvailableEncodingList::end(), the iterator is positioned at end().
RWUAvailableEncodingListIterator operator+(const RWUAvailableEncodingListIterator& lhs, RWUAvailableEncodingListIterator::difference_type offset);
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 RWUAvailableEncodingList::begin(), the iterator is positioned at begin(). If the position of the new iterator is greater than the position given by RWUAvailableEncodingList::end(), the iterator is positioned at end().
RWUAvailableEncodingListIterator operator-(const RWUAvailableEncodingListIterator& lhs, RWUAvailableEncodingListIterator::difference_type offset);
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 RWUAvailableEncodingList::begin(), the iterator is positioned at begin(). If the position of the new iterator is greater than the position given by RWUAvailableEncodingList::end(), the iterator is positioned at end().
RWUAvailableEncodingListIterator(void);
Default constructor. Creates an invalid iterator. Attempts to dereference an invalid iterator throw RWBoundsErr. Use RWUAvailableEncodingList to obtain valid iterators.
RWUAvailableEncodingListIterator( const RWUAvailableEncodingListIterator& source);
Copy constructor. Makes self a copy of source.
~RWUAvailableEncodingListIterator();
Destructor.
RWUAvailableEncodingListIterator& operator=(const RWUAvailableEncodingListIterator& rhs);
Changes the state of self to match that of rhs. Makes the list position of self equal to the list position of rhs.
bool operator==(const RWUAvailableEncodingListIterator& rhs) const;
Returns true if the list position of self is equal to the list position of rhs; otherwise, false.
bool operator!=(const RWUAvailableEncodingListIterator& rhs) const;
Returns true if the list position of self is not equal to the list position of rhs; otherwise, false.
bool operator<(const RWUAvailableEncodingListIterator& rhs) const;
Returns true if the list position of self is less than the list position of rhs; otherwise, false.
bool operator<=(const RWUAvailableEncodingListIterator& rhs) const;
Returns true if the list position of self is less than or equal to the list position of rhs; otherwise, false.
bool operator>(const RWUAvailableEncodingListIterator& rhs) const;
Returns true if the list position of self is greater than the list position of rhs; otherwise, false.
bool operator>=(const RWUAvailableEncodingListIterator& rhs) const;
Returns true if the list position of self is greater than or equal to the list position of rhs; otherwise, false.
value_type operator*() const;
Returns a const char* to a null-terminated character string containing the encoding name located at the list position specified by self.
The storage for this string is owned by the library.
Throws RWBoundsErr if the iterator is invalid or positioned past the end of the list.
RWUAvailableEncodingListIterator& operator++();
Repositions self to the next position in the encoding name list, and returns a reference to self. If self is equal to RWUAvailableEncodingList::end(), its position is left unchanged.
RWUAvailableEncodingListIterator operator++(int);
Repositions self to the next position in the encoding name list, and returns a new iterator that points to the old position. If self is equal to RWUAvailableEncodingList::end(), its position is left unchanged.
RWUAvailableEncodingListIterator& operator+=(difference_type offset);
Repositions self to a new position in the encoding 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 RWUAvailableEncodingList::begin(), self is positioned at begin(). If the new position is greater than the position given by RWUAvailableEncodingList::end(), self is positioned at end().
RWUAvailableEncodingListIterator& operator--();
Repositions self to the previous position in the encoding name list, and returns a reference to self. If self is equal to RWUAvailableEncodingList::begin(), its position is left unchanged.
RWUAvailableEncodingListIterator operator--(int);
Repositions self to the previous position in the encoding name list, and returns a new iterator that points to the old position. If self is equal to RWUAvailableEncodingList::begin(), its position is left unchanged.
RWUAvailableEncodingListIterator& operator-=(difference_type offset);
Repositions self to a new position in the encoding 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 RWUAvailableEncodingList::begin(), self is positioned at begin(). If the new position is greater than the position given by RWUAvailableEncodingList::end(), self is positioned at end().
difference_type operator-(const RWUAvailableEncodingListIterator& rhs) const;
Calculates the difference, or distance, between self and rhs.
© 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.