Class: TTypeDescriptionExtension

Declaration: TypeNegotiation.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TAggregateTypeDescriptionHint

Purpose:

TTypeDescription allows polymorphic extension of TTypeDescription. TTypeDescriptions are treated monomorphically by the system and cannot be derived. A TTypeDescription can be extended, however, by adopt a TTypeDescription extension. This extension can provide additional information, typically about an instance of a type, that can be used for comparison to further qualify the type.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derived classes of TTypeDescriptionExtension can be used to provide additional information in a TTypeDescription. Derived classes can add additional information. Derived classes should override IsEqual if the additional state is used in comparison. Also, see GetComparisionValue for special information on overriding.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TTypeDescriptionExtension::~TTypeDescriptionExtension

virtual ~ TTypeDescriptionExtension ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTypeDescriptionExtension::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

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

virtual TStream & operator <<= (TStream & towhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

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

Exceptions:

Throws TInvalidVersionError if the streamed version is not known.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTypeDescriptionExtension::operator=

TTypeDescriptionExtension & operator =(const TTypeDescriptionExtension &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

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: TTypeDescriptionExtension::TTypeDescriptionExtension

  1. TTypeDescriptionExtension ()
  2. TTypeDescriptionExtension (const TTypeDescriptionExtension &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and directly.
  2. 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: TTypeDescriptionExtension::GetComparisonValue

virtual const TTypeDescriptionExtension * GetComparisonValue () const

Interface Category:

API.

Purpose:

This function returns the TTypeDescriptionExtension value to be used when comparing the extension against an extension in another type description. When two type descriptions are compared, there comparison values returned by their extensions are also compared. If an extension does not exist, a NIL comparison value is used. Two NIL comparison values are considered equal. By default this is returned. This function can be overridden to return other values for comparison. The most common is NIL. This allows type descriptions with an optional extension to compare equal to a type description with no extension.

Calling Context:

Called by TTypeDescription.

Parameters:

Return Value:

The value to use for comparison. Default is this, can be NIL.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTypeDescriptionExtension::IsEqual

virtual bool IsEqual (const TTypeDescriptionExtension &) const

Interface Category:

API.

Purpose:

To allow polymorphic comparison of TTypeDescriptionExtension. This member fun ction is intended to be overridden by derived classes to perform derived class specific comparison. This member function is only called if the types of the two TTypeDescriptionExtension derived classes are identical.

Calling Context:

Called only by global comparison functions.

Parameters:

Return Value:

Returns true is objects are equal.

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.