Class: TPlayerView

Declaration: PlayerViews.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TSimpleView

Inherited By:

TPlayerViewFor

Purpose:

TPlayerView is derived from TSimpleView. It is used for creating a PlayerView that handles the different media types--movie, audio, and MIDI. This class combines the TMedia Presenter class, which controls the presentation, and the view class.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Not intended to be derived.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TPlayerView::TPlayerView

  1. TPlayerView(const TText & directoryName, const TText & fileName)
  2. TPlayerView(TDirectory & directory, const TFileSystemEntityName & fileName)
  3. TPlayerView(const TFileSystemEntity & file)
  4. TPlayerView(TPlayer* playerToAdopt)
  5. TPlayerView()

Interface Category:

API.

Purpose:

  1. Constructor for the player view class that lets you specify the directory location and the filename.
  2. Creates a new TPlayerView object using the specified directory and file system entity name.
  3. Creates a new TPlayerView object using the specified file system entity.
  4. Constructor that takes a pointer to the media player.
  5. Default constructor. This is used only for stream in and by derived classes.

Calling Context:

  1. Called when you have the directory name and filename for the data file.
  2. Called to use the directory and file system entity name for the data file.
  3. Called when you have the file system entity for the data file that you want to use.
  4. Call this constructor to use a pointer to the media player.
  5. Called by the stream-in operators and derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPlayerView::~TPlayerView

virtual ~ TPlayerView ()

Interface Category:

API.

Purpose:

Destructor. Deletes the TPlayerView object, any of its children, and all related storage.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPlayerView::operator>>=

virtual TStream & operator >>=(TStream &) 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:

Multithread safe.

Other Considerations:

None.

Member Function: TPlayerView::operator<<=

virtual TStream & operator <<= (TStream &)

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:

Multithread safe.

Other Considerations:

None.

Member Function: TPlayerView::AdoptPresenterAndView

virtual void AdoptPresenterAndView(TMediaPresenter * presenterToAdopt)

Interface Category:

API.

Purpose:

Adopts the media presenter and adopts the main view returned by the presenter into the view hierarchy.

Calling Context:

Called from derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPlayerView::GetEntity

virtual TFileSystemEntity GetEntity() const

Interface Category:

API.

Purpose:

Gets and returns a reference to the file system entity.

Calling Context:

Called from derived classes.

Parameters:

Return Value:

Returns a reference to the TFileSystemEntity for the player view.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPlayerView::operator!=

bool operator != (const TPlayerView &) const

Interface Category:

API.

Purpose:

Determines if two objects are not equal.

Calling Context:

Called to compare objects for inequality.

Parameters:

Return Value:

Returns true if the objects are not equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPlayerView::operator==

bool operator ==(const TPlayerView &) const

Interface Category:

API.

Purpose:

Determines if two objects are equal.

Calling Context:

Called to compare objects for equality.

Parameters:

Return Value:

Returns true if the objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPlayerView::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called to generate a hash value.

Parameters:

Return Value:

The hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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.