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.
- TLocalizableName ()
- TLocalizableName (const TText & defaultName)
- TLocalizableName (const TLocalizableName &)
Interface Category:
API.
Purpose:
- Default constructor.
- Construct an object with the default name to use if no appropriate names can be found for a certain locale.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and clients
- Called by clients
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TText & defaultName -The default name for an object.
- const TLocalizableName & -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- const TLocale & locale -The locale to get the localized name for.
- TText & localizedName -Receives the localized name.
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:
- const TLocale & locale -The locale to set the localized name for.
- const TText & localizedName -The localizable name.
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:
- TText & internalName -The internal name.
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:
- const TText & internalName -The internal name.
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:
- TText & defaultName -The default name.
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:
- const TText & defaultName -The default name.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called by clients.
Parameters:
- TStream & -The stream the object streams itself out to.
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.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called by clients.
Parameters:
- TStream & -The stream the object streams itself in from.
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.
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.