rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWUAvailableLocaleList Class Reference
[Localization]

Constructs iterators that provide access to the current list of locale names. More...

#include <rw/i18n/RWUAvailableLocaleList.h>

List of all members.

Public Types

typedef
RWUAvailableLocaleListIterator 
const_iterator

Static Public Member Functions

static const_iterator begin ()
static const_iterator end ()

Detailed Description

RWUAvailableLocaleList constructs iterators that provide access to the known list of locale names. The list cannot be changed at run time.

The begin() and end() methods are static, because there is only one list of locale names. These methods return constant iterators, because the list is immutable. RWUAvailableLocaleList may also be instantiated to produce an object that mimics a true collection.

Examples

 #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;
 }
See also:
RWUAvailableLocaleListIterator

Member Typedef Documentation

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


Member Function Documentation

RWUAvailableLocaleList::const_iterator RWUAvailableLocaleList::begin (  )  [inline, static]

Returns a const_iterator instance positioned at the first name in the locale name list.

RWUAvailableLocaleList::const_iterator RWUAvailableLocaleList::end (  )  [inline, static]

Returns a const_iterator instance positioned one past the last locale name in the locale name list.

 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.