SourcePro® API Reference Guide

 
List of all members | Public Types | Static Public Member Functions
RWUIsoCountryList Class Reference

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

#include <rw/i18n/RWUIsoCountryList.h>

Public Types

typedef const char *const * const_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef const char *const * iterator
 
typedef std::reverse_iterator< iteratorreverse_iterator
 

Static Public Member Functions

static iterator begin ()
 
static const_iterator cbegin ()
 
static const_iterator cend ()
 
static const_reverse_iterator crbegin ()
 
static const_reverse_iterator crend ()
 
static iterator end ()
 
static reverse_iterator rbegin ()
 
static reverse_iterator rend ()
 

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 methods are all static, because there is only one list of country codes. The iterator types are all constant, because the list is immutable. RWUIsoCountryList may also be instantiated to produce an object that mimics a true collection.

Example
#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.
for (iter = RWUIsoCountryList::begin();
++iter)
{
std::cout << *iter << std::endl;
}
// Iterate over the list of country codes again, obtaining
// iterators from an RWUIsoCountryList object.
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

A type that provides a const random-access iterator over the elements in the country list.

A type that provides a const random-access, reverse-order iterator over the elements in the country list.

typedef const char* const* RWUIsoCountryList::iterator

A type that provides a random-access iterator over the elements in the country list.

typedef std::reverse_iterator<iterator> RWUIsoCountryList::reverse_iterator

A type that provides a random-access, reverse-order iterator over the elements in the country list.

Member Function Documentation

RWUIsoCountryList::iterator RWUIsoCountryList::begin ( )
inlinestatic

Returns an iterator instance positioned at the first name in the list of country codes.

RWUIsoCountryList::const_iterator RWUIsoCountryList::cbegin ( )
inlinestatic

Returns a const_iterator instance positioned at the first name in the list of country codes.

RWUIsoCountryList::const_iterator RWUIsoCountryList::cend ( )
inlinestatic

Returns a const_iterator instance positioned one past the last name in the list of country codes.

RWUIsoCountryList::const_reverse_iterator RWUIsoCountryList::crbegin ( )
inlinestatic

Returns a const_reverse_iterator instance positioned at the last name in the list of country codes.

RWUIsoCountryList::const_reverse_iterator RWUIsoCountryList::crend ( )
inlinestatic

Returns a const_reverse_iterator instance positioned one prior to the first name in the list of country codes.

RWUIsoCountryList::iterator RWUIsoCountryList::end ( )
inlinestatic

Returns an iterator instance positioned one past the last name in the list of country codes.

RWUIsoCountryList::reverse_iterator RWUIsoCountryList::rbegin ( )
inlinestatic

Returns a reverse_iterator instance positioned at the last name in the list of country codes.

RWUIsoCountryList::reverse_iterator RWUIsoCountryList::rend ( )
inlinestatic

Returns a reverse_iterator instance positioned one prior to the first name in the list of country codes.

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