Class: TLocaleItem

Declaration: Localization.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TLocaleItem is a templatized class for encapsulating items in a locale. Date/time formatters, typing configuration, and preferred fonts are some examples of items in a locale. Any streamable object may be placed in a locale although currently, the interface for adding items to a locale is not externally available. Each item in a locale is uniquely identified by a TText key. Constants for system-defined items are declared in the TLocale class. An item can be retrieved by instantiating a TLocaleItem object then calling the CopyItem member function with the Text key for the item and the TLocale to be searched. CopyItem returns a pointer to a heap allocated copy of the object which the caller is then responsible for deleting. Note that since there is an inheritance relationship between locales, the item retrieved may actually belong to one of the ancestral locales.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

TLocaleItem is a concrete class designed to be used directly. It can be derived to add functionality. There are no special requirements for deriving.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TLocaleItem::TLocaleItem

TLocaleItem ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Called by the stream-in operators and by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocaleItem::~TLocaleItem

~ TLocaleItem ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocaleItem::CopyItem

AType * CopyItem (const TText & itemName, const TLocale & locale) const

Interface Category:

API.

Purpose:

Get a copy of the object with the given name in the given locale.

Calling Context:

Called by clients.

Parameters:

Return Value:

Returns a pointer to a heap allocated copy of the requested object. The caller is responsible for deleting the object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.