Class: TMediaComponent

Declaration: TimeMedia.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TGraphicView TMIDIInterface TVideoDigitizer TAudioComponent TPlayer

Purpose:

Represents a black box with input and output ports. Surrogates for the ports can be obtained by the client and then used to connect TMediaComponent derived classes. Localizable names for each port can be obtained by the client.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive TMediaComponent to create concrete objects such as sound, video, or MIDI players.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TMediaComponent::~TMediaComponent

virtual ~ TMediaComponent ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called by derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaComponent::GetMediaComponentType

virtual const TMediaComponentType& GetMediaComponentType () const

Interface Category:

API.

Purpose:

Determines the media type and category of this component. The base class implementation provides the default values of TMediaType::GetMedia for the media type and TMediaComponentType::GetComponent for the component category. Deriving classes of TMediaComponent should override this function to provide derived class specific type information.

Calling Context:

Call directly to determine the category of the component. Used by TimeMediaRegistryServer and Media UI Framework.

Parameters:

Return Value:

const TMediaComponentType& -The media component type value associated with this component.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes should declare and initialize a static TMediaComponentType in their implementations of this member function so that the constant reference remains valid.

Member Function: TMediaComponent::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called by derived classes. Used by ::Flatten for polymorphic streaming.

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: TMediaComponent::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called by collection classes.

Parameters:

Return Value:

The hash number.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaComponent::TMediaComponent

  1. TMediaComponent ()
  2. TMediaComponent (const TMediaComponent &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Protected -Called by a derived class.
  2. Protected -Called by a derived class. Parameters:
  3. Takes no parameters.
  4. const TMediaComponent & -The media component to copy.

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaComponent::operator=

TMediaComponent & operator =(const TMediaComponent &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call directly when an object is assigned to another compatible object. Called by derived classes.

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

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

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called by derived classes. Used by ::Resurrect for polymorphic streaming.

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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.