rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWUEncodingAliasList Class Reference
[Character Encoding Scheme Conversion]

Constructs iterators to access the list of encoding aliases associated with a given encoding. More...

#include <rw/i18n/RWUEncodingAliasList.h>

List of all members.

Public Types

typedef
RWUEncodingAliasListIterator 
const_iterator

Public Member Functions

 RWUEncodingAliasList (const RWCString &enc)
const_iterator begin () const
const_iterator end () const
const RWCStringgetName () const
uint16_t getCount () const

Detailed Description

RWUEncodingAliasList constructs iterators that provide access to the list of encoding aliases associated with a given encoding. The list cannot be changed at run time.

Because the list is immutable, the begin() and end() methods return constant iterators.

Examples

 #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
See also:
RWUEncodingAliasListIterator

Member Typedef Documentation

Declares a conventional Standard C++ alias for the iterator class.


Constructor & Destructor Documentation

RWUEncodingAliasList::RWUEncodingAliasList ( const RWCString enc  )  [inline]

Constructs an encoding alias list for the specified encoding enc. Throws RWUException if the specified encoding does not exist.


Member Function Documentation

RWUEncodingAliasList::const_iterator RWUEncodingAliasList::begin (  )  const [inline]

Returns a const_iterator instance positioned at the first alias in the encoding alias list.

RWUEncodingAliasList::const_iterator RWUEncodingAliasList::end (  )  const [inline]

Returns a const_iterator instance positioned one past the last alias in the encoding alias list.

uint16_t RWUEncodingAliasList::getCount (  )  const [inline]

Returns the number of encoding aliases contained in self.

const RWCString & RWUEncodingAliasList::getName (  )  const [inline]

Returns a reference to string that contains the encoding name used to create self.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.