Public Member Functions | Protected Member Functions | Protected Attributes

VizKit::VisualActor Class Reference

#include <VisualActor.h>

Inherited by VizKit::BeatlightActor, VizKit::CoverArtActor, VizKit::ProcessMonitorActor, VizKit::TemplateActor, VizKit::TrackLyricsActor, VizKit::TrackTitleActor, and VizKit::UpdateServiceActor.

List of all members.

Public Member Functions

 VisualActor ()
virtual ~VisualActor ()
 VisualActor (const VisualActor &other)
VisualActoroperator= (const VisualActor &other)
virtual VisualActorclone (void) const
virtual void init (void)
virtual const char *const getName (void)
virtual void show (const VisualPlayerState &visualPlayerState)
virtual VisualActorState getState (void)
virtual void setState (VisualActorState actorState)
virtual void handleNotification (VisualNotification &aNotification)
virtual uint8 getError (char *errorString)

Protected Member Functions

void copy (const VisualActor &other)

Protected Attributes

VisualActorState state
char actorName [64]

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

VisualActor::VisualActor (  ) 

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

VisualActor::~VisualActor (  )  [virtual]

The destructor. Each actor can implement its own destructor.

VisualActor::VisualActor ( const VisualActor other  ) 

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:
other Another 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] errorString The 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.
VisualActorState VisualActor::getState ( void   )  [virtual]

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:
aNotification The 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::BeatlightActor, VizKit::CoverArtActor, VizKit::ProcessMonitorActor, VizKit::TemplateActor, VizKit::TrackLyricsActor, VizKit::TrackTitleActor, and VizKit::UpdateServiceActor.

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::BeatlightActor, VizKit::CoverArtActor, VizKit::ProcessMonitorActor, VizKit::TemplateActor, VizKit::TrackLyricsActor, and VizKit::TrackTitleActor.

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:
actorState The 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:
visualPlayerState Read-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::BeatlightActor, VizKit::CoverArtActor, VizKit::ProcessMonitorActor, VizKit::TemplateActor, VizKit::TrackLyricsActor, VizKit::TrackTitleActor, and VizKit::UpdateServiceActor.


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 Sep 26 2010 13:29:36 for VizKit by doxygen 1.7.1