SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
A Standard C++ Libary bidirectional iterator for class RWUEncodingAliasList. More...
#include <rw/i18n/RWUEncodingAliasListIterator.h>
RWUEncodingAliasListIterator is a Standard C++ bidirectional iterator for class RWUEncodingAliasList. An instance of RWUEncodingAliasListIterator can be used to access the list of aliases associated with any encoding currently recognized by the Internationalization Module. The list cannot be changed at run time.
An RWUEncodingAliasListIterator instance is only valid as long as the RWUEncodingAliasList instance used to create it continues to exist.
#include <rw/i18n/RWUEncodingAliasList.h> #include <iostream> int main() { // Construct a list object. RWUEncodingAliasList list("US-ASCII"); // Iterate over the list of aliases and write them // to std::cout. RWUEncodingAliasListIterator iter; for (iter = list.begin(); iter != list.end(); ++iter) { std::cout << *iter << std::endl; } return 0; }
Program output:
US-ASCII ascii ascii-7 ANSI_X3.4-1968 ANSI_X3.4-1986 ISO_646.irv:1991 iso646-us us csASCII 646 iso-ir-6 cp367
typedef int32_t RWUEncodingAliasListIterator::difference_type |
Declares a conventional Standard C++ alias for the type used to represent iterator offsets and differences.
typedef std::bidirectional_iterator_tag RWUEncodingAliasListIterator::iterator_category |
Tags this class as a Standard C++ bidirectional iterator.
typedef const value_type* RWUEncodingAliasListIterator::pointer |
Declares a conventional Standard C++ alias for the value pointer type.
typedef const value_type& RWUEncodingAliasListIterator::reference |
Declares a conventional Standard C++ alias for the value reference type.
typedef const char* RWUEncodingAliasListIterator::value_type |
Declares a conventional Standard C++ alias for the value type returned by operator*().
RWUEncodingAliasListIterator::RWUEncodingAliasListIterator | ( | void | ) | [inline] |
Default constructor. Creates an invalid iterator. Attempts to dereference an invalid iterator throw RWBoundsErr. Use RWUEncodingAliasList to obtain valid iterators.
RWUEncodingAliasListIterator::RWUEncodingAliasListIterator | ( | const RWUEncodingAliasListIterator & | source | ) | [inline] |
Copy constructor.
RWUEncodingAliasListIterator::~RWUEncodingAliasListIterator | ( | ) | [inline] |
Destructor.
bool RWUEncodingAliasListIterator::operator!= | ( | const RWUEncodingAliasListIterator & | rhs | ) | const [inline] |
Returns true
if the list position of self is not equal to the list position of rhs; otherwise, false
.
This method always returns true
if self refers to a different alias list than rhs.
value_type RWUEncodingAliasListIterator::operator* | ( | ) | const |
Returns a const
char*
to a null-terminated character string that contains the alias 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. |
RWUEncodingAliasListIterator RWUEncodingAliasListIterator::operator++ | ( | int | ) |
Prefix operator. Repositions self to the next position in the encoding alias list unless self has the same value as RWUEncodingAliasList::end(), in which case its position is left unchanged. Returns a copy of the previous value of self.
RWUEncodingAliasListIterator& RWUEncodingAliasListIterator::operator++ | ( | ) |
Repositions self to the next position in the encoding alias list unless self has the same value as RWUEncodingAliasList::end(), in which case its position is left unchanged. Returns a reference to self.
RWUEncodingAliasListIterator& RWUEncodingAliasListIterator::operator+= | ( | difference_type | offset | ) |
Adds offset to the current iterator position. If the new position is less than the position given by RWUEncodingAliasList::begin(), self is positioned at RWUEncodingAliasList::begin(). If the new position is greater than the position given by RWUEncodingAliasList::end(), self is positioned at RWUEncodingAliasList::end(). Returns a reference to self.
RWUEncodingAliasListIterator::difference_type RWUEncodingAliasListIterator::operator- | ( | const RWUEncodingAliasListIterator & | rhs | ) | const [inline] |
Calculates the difference, or distance, between self and rhs.
RWUEncodingAliasListIterator RWUEncodingAliasListIterator::operator-- | ( | int | ) | [inline] |
Prefix operator. Repositions self to the previous position in the encoding alias list unless self has the same value as RWUEncodingAliasList::begin(), in which case its position is unchanged. Returns a copy of the previous value of self.
RWUEncodingAliasListIterator & RWUEncodingAliasListIterator::operator-- | ( | ) | [inline] |
Repositions self to the previous position in the encoding alias list unless self has the same value as RWUEncodingAliasList::begin(), in which case its position is unchanged. Returns a reference to self.
RWUEncodingAliasListIterator& RWUEncodingAliasListIterator::operator-= | ( | difference_type | offset | ) |
Subtracts offset from the current iterator position. If the new position is less than the position given by RWUEncodingAliasList::begin(), self is positioned at RWUEncodingAliasList::begin(). If the new position is greater than the position given by RWUEncodingAliasList::end(), self is positioned at RWUEncodingAliasList::end(). Returns a reference to self.
bool RWUEncodingAliasListIterator::operator< | ( | const RWUEncodingAliasListIterator & | rhs | ) | const [inline] |
Returns true
if the list position of self is less than the list position of rhs; otherwise, false
.
This method always returns false
if self refers to a different alias list than rhs.
bool RWUEncodingAliasListIterator::operator<= | ( | const RWUEncodingAliasListIterator & | rhs | ) | const [inline] |
Returns true
if the list position of self is less than or equal to the list position of rhs; otherwise, false
.
This method always returns false
if self refers to a different alias list than rhs.
RWUEncodingAliasListIterator & RWUEncodingAliasListIterator::operator= | ( | const RWUEncodingAliasListIterator & | source | ) | [inline] |
Changes the state of self to match that of source.
bool RWUEncodingAliasListIterator::operator== | ( | const RWUEncodingAliasListIterator & | rhs | ) | const [inline] |
Returns true
if the list position of self is equal to the list position of rhs; otherwise, false
.
This method always returns false
if self refers to a different alias list than rhs.
bool RWUEncodingAliasListIterator::operator> | ( | const RWUEncodingAliasListIterator & | rhs | ) | const [inline] |
Returns true
if the list position of self is greater than the list position of rhs; otherwise, false
.
This method always returns false
if self refers to a different alias list than rhs.
bool RWUEncodingAliasListIterator::operator>= | ( | const RWUEncodingAliasListIterator & | rhs | ) | const [inline] |
Returns true
if the list position of self is greater than or equal to the list position of rhs; otherwise, false
.
This method always returns false
if self refers to a different alias list than rhs.
RWUEncodingAliasListIterator operator+ | ( | const RWUEncodingAliasListIterator & | lhs, | |
RWUEncodingAliasListIterator::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 RWUEncodingAliasList::begin(), the iterator is positioned at RWUEncodingAliasList::begin(). If the position of the new iterator is greater than the position given by RWUEncodingAliasList::end(), the iterator is positioned at RWUEncodingAliasList::end().
RWUEncodingAliasListIterator operator+ | ( | RWUEncodingAliasListIterator::difference_type | offset, | |
const RWUEncodingAliasListIterator & | 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 RWUEncodingAliasList::begin(), the iterator is positioned at RWUEncodingAliasList::begin(). If the position of the new iterator is greater than the position given by RWUEncodingAliasList::end(), the iterator is positioned at RWUEncodingAliasList::end().
RWUEncodingAliasListIterator operator- | ( | const RWUEncodingAliasListIterator & | lhs, | |
RWUEncodingAliasListIterator::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 RWUEncodingAliasList::begin(), the iterator is positioned at RWUEncodingAliasList::begin(). If the position of the new iterator is greater than the position given by RWUEncodingAliasList::end(), the iterator is positioned at RWUEncodingAliasList::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.