Listing Country Codes
Class
RWUIsoCountryList constructs iterators that provide access to the static list of ISO-3166 country codes recognized by the Internationalization Module. For example, you might use this class to display a list of country codes to an end user. The list cannot be changed at run time.
The static begin() and end() methods return standard iterators. This code constructs an iterator object, then iterates over the list of country codes and writes them to std::cout:
RWUIsoCountryList::const_iterator iter;
for (iter = RWUIsoCountryList::begin();
iter != RWUIsoCountryList::end();
++iter) {
std::cout << *iter << std::endl;
}
RWUIsoCountryList may also be instantiated to produce an object that allows easy access to the static methods:
RWUIsoCountryList::const_iterator iter;
RWUIsoCountryList list;
for (iter = list.begin(); iter != list.end(); ++iter) {
std::cout << *iter << std::endl;
}
NOTE: The Internationalization Module does not recognize deprecated country codes.