SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWUEncodingAliasListIterator Class Reference

A C++ Standard Library-compatible random-access iterator for class RWUEncodingAliasList. More...

#include <rw/i18n/RWUEncodingAliasListIterator.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

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

Friends

class RWUEncodingAliasList
 

Related Symbols

(Note that these are not member symbols.)

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

Detailed Description

RWUEncodingAliasListIterator is a C++ Standard Library-compatible random-access 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.

Example
#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.
for (iter = list.begin(); iter != list.end(); ++iter) {
std::cout << *iter << std::endl;
}
return 0;
}
A C++ Standard Library-compatible random-access iterator for class RWUEncodingAliasList.
Definition RWUEncodingAliasListIterator.h:101
Constructs iterators to access the list of encoding aliases associated with a given encoding.
Definition RWUEncodingAliasList.h:93

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
See also
RWUEncodingAliasList

Member Typedef Documentation

◆ difference_type

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

◆ iterator_category

typedef std::random_access_iterator_tag RWUEncodingAliasListIterator::iterator_category

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

◆ pointer

Declares an alias for the value pointer type.

◆ reference

Declares an alias for the value reference type.

◆ value_type

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

Constructor & Destructor Documentation

◆ RWUEncodingAliasListIterator() [1/2]

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() [2/2]

RWUEncodingAliasListIterator::RWUEncodingAliasListIterator ( const RWUEncodingAliasListIterator & source)
inline

Copy constructor.

◆ ~RWUEncodingAliasListIterator()

RWUEncodingAliasListIterator::~RWUEncodingAliasListIterator ( )
inline

Destructor.

Member Function Documentation

◆ operator!=()

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.

◆ operator*()

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.

Exceptions
RWBoundsErrThrown if the iterator is invalid or positioned past the end of the list.

◆ operator++() [1/2]

RWUEncodingAliasListIterator & RWUEncodingAliasListIterator::operator++ ( )

Repositions self to the next position in the encoding alias list and returns a reference to self.

◆ operator++() [2/2]

RWUEncodingAliasListIterator RWUEncodingAliasListIterator::operator++ ( int )

Repositions self to the next position in the encoding alias list and returns a copy of the previous value of self.

◆ operator+=()

RWUEncodingAliasListIterator & RWUEncodingAliasListIterator::operator+= ( difference_type offset)

Adds offset to the current iterator position.

◆ operator-()

RWUEncodingAliasListIterator::difference_type RWUEncodingAliasListIterator::operator- ( const RWUEncodingAliasListIterator & rhs) const
inline

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

◆ operator--() [1/2]

RWUEncodingAliasListIterator & RWUEncodingAliasListIterator::operator-- ( )
inline

Repositions self to the preceding position in the encoding alias list and returns a reference to self.

◆ operator--() [2/2]

RWUEncodingAliasListIterator RWUEncodingAliasListIterator::operator-- ( int )
inline

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

◆ operator-=()

RWUEncodingAliasListIterator & RWUEncodingAliasListIterator::operator-= ( difference_type offset)

Subtracts offset from the current iterator position.

◆ operator<()

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.

◆ operator<=()

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.

◆ operator=()

RWUEncodingAliasListIterator & RWUEncodingAliasListIterator::operator= ( const RWUEncodingAliasListIterator & source)
inline

Changes the state of self to match that of source.

◆ operator==()

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.

◆ operator>()

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.

◆ operator>=()

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.

◆ operator[]()

value_type RWUEncodingAliasListIterator::operator[] ( difference_type offset) const

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

Friends And Related Symbol Documentation

◆ operator+() [1/2]

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

◆ operator+() [2/2]

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

◆ operator-()

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

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