rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWUIsoCountryList Class Reference
[Localization]

Constructs iterators to access the static list of ISO 3166 country codes recognized by the Internationalization Module. More...

#include <rw/i18n/RWUIsoCountryList.h>

List of all members.

Public Types

typedef const char *const * const_iterator

Static Public Member Functions

static const_iterator begin ()
static const_iterator end ()

Detailed Description

RWUIsoCountryList constructs iterators that provide access to the static list of ISO 3166 country codes recognized by the Internationalization Module. The list of country codes may be found at http://www.iso.org/iso/country_codes.htm. The Internationalization Module does not recognize deprecated codes.

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

Examples

 #include <rw/i18n/RWUIsoCountryList.h>
 #include <iostream>
 
 int
 main()
 {
   // Iterate over the list of country codes and write them
   // to std::cout, obtaining iterators from the static
   // RWUIsoCountryList begin() and end() methods.
   RWUIsoCountryList::const_iterator iter;
   for (iter = RWUIsoCountryList::begin();
        iter != RWUIsoCountryList::end();
        ++iter)
   {
     std::cout << *iter << std::endl;
   }
 
   // Iterate over the list of country codes again, obtaining
   // iterators from an RWUIsoCountryList object.
   RWUIsoCountryList list;
   for (iter = list.begin(); iter != list.end(); ++iter) {
     std::cout << *iter << std::endl;
   }
 
   return 0;
 }

Member Typedef Documentation

typedef const char* const* RWUIsoCountryList::const_iterator

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


Member Function Documentation

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

Returns a const_iterator instance positioned at the first known ISO 3166 country code.

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

Returns a const_iterator instance positioned one past the last known ISO 3166 country code.

 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.