Class: TMediaStationery

Declaration: MediaUI.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TDocumentComponentStationery

Inherited By:

TAudioStationery TMIDIStationery TMovieStationery

Purpose:

TMediaStationery is a document-related class that is derived from TDocumentComponentStationery. The primary function of this class is to provide a convenient means of creating an instance of the different media document types, such as movie, MIDI, and audio data. Each document type consists of a media model and a media presenter state. TMediaStationery and its derived classes provide a convenient way for creating a compound document consisting of a media model and a media presenter state. TMediaStationery also allows the media documents to be created easily in the Workspace.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derived classes represent a different form of media data, either movie, audio, or MIDI data.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TMediaStationery::~TMediaStationery

virtual ~ TMediaStationery ()

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

  1. TMediaStationery ()
  2. TMediaStationery (TMediaSequence * sequenceToAdopt)
  3. TMediaStationery (const TMediaStationery &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Constructor that creates a new TMediaStationery object from a pointer to a TMediaSequence object.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and derived classes.
  2. Called to create a media stationery. Normally, you should use this constructor.
  3. Called to copy a stationery object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Returns the hash value that uniquely identifies this object within its type. Hash values are used to build dictionaries of objects.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the hash value that uniquely identifies this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::operator==

bool operator ==(const TMediaStationery &) const

Interface Category:

API.

Purpose:

Tests for equality between the specified TMediaStationery object and this TMediaStationery object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if both objects are equal; otherwise, returns false.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::operator!=

bool operator != (const TMediaStationery &) const

Interface Category:

API.

Purpose:

Tests for inequality between the specified TMediaStationery object and this TMediaStationery object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if both objects are different; otherwise, returns false.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::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: TMediaStationery::operator<<=

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

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 no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::CreateDocument

virtual TDocumentReference CreateDocument(const TMultiBinStorageMechanism &)

Interface Category:

API.

Purpose:

Creates an instance of the media document.

Calling Context:

Called to create an instance of the media document.

Parameters:

Return Value:

Returns a pointer to the newly created TDocumentReference object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::CreateModel

virtual TModel * CreateModel()

Interface Category:

API.

Purpose:

Creates an instance of the media model.

Calling Context:

Called to create an instance of the media model.

Parameters:

Return Value:

Returns a pointer to the newly created TModel object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::CreateModelPresenterState

virtual TModelPresenterState * CreateModelPresenterState ()

Interface Category:

API.

Purpose:

Creates an instance of the media presenter state. This function is called by the Presentation framework when the framework creates and opens a document.

Calling Context:

Called by the Presentation framework to create an instance of the media presenter state.

Parameters:

Return Value:

Returns a pointer to the newly created TModelPresenterState object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::AdoptSequence

virtual void AdoptSequence (TMediaSequence *)

Interface Category:

API.

Purpose:

Deletes the current sequence and then adopts the new sequence.

Calling Context:

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: TMediaStationery::OrphanSequence

virtual TMediaSequence * OrphanSequence ()

Interface Category:

API.

Purpose:

Returns a media sequence that had been previously adopted. The currently referenced media sequence is set to NIL.

Calling Context:

Called directly when the media sequence is no longer to be used.

Parameters:

Return Value:

Returns a pointer to the media sequence that is orphaned.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaStationery::GetSequence

virtual const TMediaSequence * GetSequence () const

Interface Category:

API.

Purpose:

Returns a reference to the media sequence.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the media sequence 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.