Class: TTypeDescription

Declaration: TypeNegotiation.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TTypeDescription is a concrete class that is used as part of a type negotiation: for example, cut, copy, and paste. Typically, a data source produces a list of TTypeDescriptions, describing the types it can produce. A data receiver will choose the most appropriate type from the list and request the data in that type. Most TModel derived classes provide a static GetTypeDescription function that returns the type description describing that model's class. A TTypeDescription uses the class TType to identify the described objects type. A TTypeDescriptionExtension may also be included to provide additional information about the type or an instance of the type. If a TTypeDescriptionExtension exists, it is used for comparison.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class must not be derived. This system treats TTypeDescription monomorphically. To extend a TTypeDescription, see TTypeDescriptionExtension.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TTypeDescription::TTypeDescription

  1. TTypeDescription (const TType &)
  2. TTypeDescription (const TType &, TTypeDescriptionExtension *)
  3. TTypeDescription ()
  4. TTypeDescription (const TTypeDescription &)

Interface Category:

API.

Purpose:

  1. Creates a new TTypeDescription and initializes it to the specified type.
  2. Creates a new TTypeDescription object and initializes it to the specified type, and adopts the TTypeDescriptionExtension.
  3. Default constructor.
  4. Copy constructor.

Calling Context:

  1. You can call this function directly.
  2. You can call this function directly.
  3. Called by the stream-in operators.
  4. 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: TTypeDescription::operator=

TTypeDescription & operator =(const TTypeDescription &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a 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: TTypeDescription::~TTypeDescription

virtual ~ TTypeDescription ()

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: TTypeDescription::GetType

TType GetType () const

Interface Category:

API.

Purpose:

Returns the current type for this type description object. The current type can be empty.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

Returns a TType that is the current type for this type description object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTypeDescription::SetType

void SetType (const TType &)

Interface Category:

API.

Purpose:

Sets the type for this type description object to the specified TToken.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTypeDescription::AdoptExtension

void AdoptExtension (TTypeDescriptionExtension *)

Interface Category:

API.

Purpose:

Adopt a type description extension into this type description. The extension allows additional, type specific data to be specified for the type.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTypeDescription::GetExtension

const TTypeDescriptionExtension * GetExtension () const

Interface Category:

API.

Purpose:

Gets thetype description extension associated with this type description. The extension may be NIL type.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

TTypeDescriptionExtension * -The current extension for this type description.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTypeDescription::operator>>=

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

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 know.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTypeDescription::Hash

HashResult Hash () const

Interface Category:

API.

Purpose:

Returns the hash value for this type description object which uniquely identifies this object within its type.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

Returns the hash value for this type description 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.