ILocaleKeyIterator

The ILocaleKeyIterator class lets you iterate through the locales that are currently installed on the local machine which have resources associated with them. ILocaleKeyIterator provides the protocol for traversing the list of all available locales that have international resources associated with them. The list traversed by the iterator is the one on the current machine. As such, it may be a subset of all supported locales. For this reason, the returned data will not provide information about supported locales that are not installed. You must specify the evironment variable LOCPATH before the using POSIX international resources.

Do not derive your own classes from this class.


ILocaleKeyIterator - Member Functions and Data by Group

Constructors & Destructor

Use these constructors and destructor to create and destroy objects of class ILocaleKeyIterator.


[view class]
~ILocaleKeyIterator
public:
~ILocaleKeyIterator()
Destructor for deleting an ILocaleKeyIterator object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
ILocaleKeyIterator


Overload 1
public:
ILocaleKeyIterator()
Creates a locale key Iterator.

Exception

IInvalidRequest exception will be thrown when instantiating the ILocaleKeyIterator using POSIX interface if the LOCPATH variable is not specified.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
ILocaleKeyIterator(const ILocaleKeyIterator& that)
Copy constructor. Initializes an ILocaleKeyIterator object from another ILocaleKeyIterator object.

that
the ILocaleKeyIterator object being copied in.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Assignment Operator

Use this function to replace the current ILocaleKeyIterator with the given one.


[view class]
operator =
public:
ILocaleKeyIterator& operator =( const ILocaleKeyIterator& that )
Replaces the entire contents of *this with the specified value.

that
the ILocaleKeyIterator object being copied in.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Comparing Two ILocaleKeyIterator Objects for Equality and Inequality

Use these operators to test the given locale key iterator against the current one for equality or inequality.


[view class]
operator !=
Checks if two locale key iterators are not the same.
public:
bool operator !=(const ILocaleKeyIterator& that) const
Checks whether two locale key iterators are not the same.

that
A constant reference to the locale key iterator object to be compared with this, the current, one.

Return
true if the two locale key iterators are not the same, false otherwise.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator ==
Checks if two locale key iterators are the same.
public:
bool operator ==(const ILocaleKeyIterator& that) const
Checks whether two locale key iterators are the same.

that
A constant reference to the locale key iterator object to be compared with this, the current, one.

Return
true if the two locale key iterators are the same, false otherwise.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Detecting the End of the Iterator Traversal

Use the functions in this group to determine if the iterator has traversed all the items of the list and has consumed the last one.


[view class]
end
public:
static ILocaleKeyIterator end()
Checks if the iterator had consumed the last list item.

Return
the equivalent of NIL atom of a list to show the last list item has been consumed.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator bool
public:
operator bool() const
Checks if the iterator had consumed the last list item.

Return
true if there are no more locales to iterate through, false otherwise.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Getting the Current Locale Key

Use this function to obtain the current locale key.


[view class]
operator *
public:
ILocaleKey operator *() const
Returns the current locale key in the list.

Return
the current locale key by value.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Incrementing the Iterator

Use this operator to increment the iterator to the next position.


[view class]
operator ++
public:
ILocaleKeyIterator operator ++(int)
Operator that increments the locale key iterator.
Advances to the next locale key.

int
This (int type) represents the postfix form of ++ operator.

Return
the advanced locale key iterator.

Exception

IInvalidRequest If the last locale key has been consumed and advancing request is made by the clients.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Moving and Resetting the Cursor

Use this function to point the cursor at the first list item.


[view class]
operator ++
Increments the iterator after the operation is performed, using the postfix increment operator.
public:
ILocaleKeyIterator& operator ++()
Advances to the next locale key.

Return
the advanced locale key iterator.

Exception

IInvalidRequest If the last locale key has been consumed and advancing request is made by the clients.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator ->
public:
const ILocaleKey* operator ->() const
Returns a constant pointer to the current locale key in the list.

Return
the current locale key by address.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
reset
public:
void reset()
Reset the cursor pointer to the first item on the list.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


ILocaleKeyIterator - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data