Class: TLocalizableName

Declaration: Localization.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

TLocalizableName is a concrete class which defines the protocol for accessing the name of an object. Objects may have two forms of identification: an internal id (or programmer name) that uniquely identifies the object, and a set of localizable names. For example the French keyboard may have the "programmer-name" of "FR", and the localized names "French" (English locales), and "Francais" (French locales).

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

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

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TLocalizableName::TLocalizableName

  1. TLocalizableName ()
  2. TLocalizableName (const TText & defaultName)
  3. TLocalizableName (const TLocalizableName &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Construct an object with the default name to use if no appropriate names can be found for a certain locale.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and clients
  2. Called by clients
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalizableName::~TLocalizableName

virtual ~ TLocalizableName ()

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: TLocalizableName::GetLocalizedName

virtual void GetLocalizedName (const TLocale & locale, TText & localizedName) const

Interface Category:

API.

Purpose:

Returns the appropriate name for a given locale.

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: TLocalizableName::SetLocalizedName

virtual void SetLocalizedName (const TLocale & locale, const TText & localizedName)

Interface Category:

API.

Purpose:

Returns the appropriate name for a given locale.

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: TLocalizableName::GetInternalName

virtual void GetInternalName (TText & internalName) const

Interface Category:

API.

Purpose:

Returns the internal, or programmer's name for a localized object. This name can be used as an unique identifier for objects.

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: TLocalizableName::SetInternalName

virtual void SetInternalName (const TText & internalName)

Interface Category:

API.

Purpose:

Specifies the internal, or programmer's name for a localized object.

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: TLocalizableName::GetDefaultName

virtual void GetDefaultName (TText & defaultName) const

Interface Category:

API.

Purpose:

Returns the default name for an object. Will try to get the name for the current locale. If none found, will use the default name for this object. If no default name has been specified, returns the internal name.

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: TLocalizableName::SetDefaultName

virtual void SetDefaultName (const TText & localizedName)

Interface Category:

API.

Purpose:

Specifies the default name for an object.

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: TLocalizableName::operator=

TLocalizableName & operator =(const TLocalizableName &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called by clients.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalizableName::operator==

virtual bool operator ==(const TLocalizableName &) const

Interface Category:

API.

Purpose:

Equality operator.

Calling Context:

Called by clients.

Parameters:

Return Value:

Returns true if the objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalizableName::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called by clients.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalizableName::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called by clients.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLocalizableName::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Overrides inherited MCollectible function.

Calling Context:

Same as for base class.

Parameters:

Return Value:

The numeric value of the hash.

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.