VizKit  3.3.7
Public Member Functions | Protected Member Functions | Protected Attributes
VizKit::VisualActor Class Reference

VisualActor defines the interface for each specific actor. More...

#include <VisualActor.h>

Inheritance diagram for VizKit::VisualActor:
VizKit::BeatlightActor VizKit::CoverArtActor VizKit::ProcessMonitorActor VizKit::TemplateActor VizKit::TrackLyricsActor VizKit::TrackTitleActor VizKit::UpdateServiceActor

List of all members.

Public Member Functions

 VisualActor ()
 The constructor.
virtual ~VisualActor ()
 The destructor.
 VisualActor (const VisualActor &other)
 Copy constructor.
VisualActoroperator= (const VisualActor &other)
 Assignment operator.
virtual VisualActorclone (void) const
 Copies the current VisualActor and returns a pointer to a new VisualActor.
virtual void init (void)
 Initialization method called immediately after construction.
virtual const char *const getName (void)
 Returns the name of the actor.
virtual void show (const VisualPlayerState &visualPlayerState)
 Asks the actor to perform individual show.
virtual VisualActorState getState (void)
 Returns the state of the actor.
virtual void setState (VisualActorState actorState)
 Sets the state of the actor.
virtual void handleNotification (VisualNotification &aNotification)
 The actor receives a notification.
virtual uint8 getError (char *errorString)
 After the completion of the show, the actor is called to see if any errors occured.

Protected Member Functions

void copy (const VisualActor &other)
 Copy method for assignment operator and copy constructor.

Protected Attributes

VisualActorState state
 The state of the VisualActor.
char actorName [64]
 The name of the VisualActor.

Detailed Description

VisualActor defines the interface for each specific actor.

VisualActor is an abstract class each actor has to implement. Some virtual methods are pure abstract interface methods which must be overridden by the concrete actor. Some virtual methods provide a default implementation which can be overridden by the concrete actor.


Constructor & Destructor Documentation

The constructor.

Each actor should implement its own constructor that is called additionally.

The destructor.

Each actor can implement its own destructor.

Copy constructor.


Member Function Documentation

VisualActor * VisualActor::clone ( void  ) const [virtual]

Copies the current VisualActor and returns a pointer to a new VisualActor.

void VisualActor::copy ( const VisualActor other) [protected]

Copy method for assignment operator and copy constructor.

Parameters:
otherAnother VisualActor.
uint8 VisualActor::getError ( char *  errorString) [virtual]

After the completion of the show, the actor is called to see if any errors occured.

This method is implemented by the VisualActor interface class. It calls the OpenGL error handler. Should not be overridden by subclass. Subclasses can implement the method but should then call the superclass implementation inside the subclass implementation also.

Parameters:
[out]errorStringThe error c-string.
Returns:
The error number. 0 is no error.
const char *const VisualActor::getName ( void  ) [virtual]

Returns the name of the actor.

The name is used as identifier by the VisualStageControl.

Remarks:
Virtual method that does not need to be implemented by subclass. The name of the implemented visual actor is returned if the variable actorName is set correctly.

Returns the state of the actor.

Interface method that does not need to be implemented by subclass. Default implementation returns the value of the state variable.

Returns:
The state of the actor expressed as VisualActorState.
Remarks:
If the actor's state is kVisActNoShow, it is not called by the VisualEnsemble.
void VisualActor::handleNotification ( VisualNotification aNotification) [virtual]

The actor receives a notification.

Each actor can register for a notification (event/message) by calling VisualNotification's registerNotification(). This function receives the notification. Hook method that can be implemented by subclass.

Parameters:
aNotificationThe notification package.
Remarks:
For debugging and diagnostical puposes, the subclass can explicitly call the method of the VisualActor interface class. Each notification key will be written to error log then.

Reimplemented in VizKit::ProcessMonitorActor, VizKit::TemplateActor, VizKit::CoverArtActor, VizKit::BeatlightActor, VizKit::UpdateServiceActor, VizKit::TrackTitleActor, and VizKit::TrackLyricsActor.

void VisualActor::init ( void  ) [virtual]

Initialization method called immediately after construction.

Remarks:
The initialization routine can be used to register for notifications by calling VisualNotification::registerNotification().

Reimplemented in VizKit::ProcessMonitorActor, VizKit::TemplateActor, VizKit::CoverArtActor, VizKit::BeatlightActor, VizKit::TrackTitleActor, and VizKit::TrackLyricsActor.

VisualActor & VisualActor::operator= ( const VisualActor other)

Assignment operator.

void VisualActor::setState ( VisualActorState  actorState) [virtual]

Sets the state of the actor.

Interface method that does not need to be implemented by subclass. Default implementation sets the value of the state variable.

Parameters:
actorStateThe requested state of the actor expressed as VisualActorState.
Remarks:
If the actor's state is kVisActNoShow, it is not called by the VisualEnsemble.

Reimplemented in VizKit::ProcessMonitorActor, and VizKit::UpdateServiceActor.

void VisualActor::show ( const VisualPlayerState visualPlayerState) [virtual]

Asks the actor to perform individual show.

This is the main method of the actor.

Parameters:
visualPlayerStateRead-only access to the VisualPlayerState.
Remarks:
Show() is called by the VisualEnsemble as part of the showEnsemble() method. This interface method should be implemented by subclass to display the main graphic art show of the actor.

Reimplemented in VizKit::ProcessMonitorActor, VizKit::TemplateActor, VizKit::CoverArtActor, VizKit::BeatlightActor, VizKit::UpdateServiceActor, VizKit::TrackTitleActor, and VizKit::TrackLyricsActor.


Member Data Documentation

char VizKit::VisualActor::actorName[64] [protected]

The name of the VisualActor.

The state of the VisualActor.


The documentation for this class was generated from the following files:

Generated on Sun May 3 2015 20:26:31 for VizKit by doxygen 1.8.0