Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

BaseListener Class Reference

Inheritance diagram for BaseListener:

Inheritance graph
[legend]
Collaboration diagram for BaseListener:

Collaboration graph
[legend]

Detailed Description

Listen messages.

Listener must register oneself to MessagerAgent to be able to receive messages.

Definition at line 19 of file BaseListener.h.

Public Member Functions

virtual ~BaseListener ()
virtual void receiveSimple (const SimpleMsg *msg)
 
Exceptions:
UnknownMsgException 

virtual void receiveInt (const IntMsg *msg)
 
Exceptions:
UnknownMsgException 

virtual void receiveString (const StringMsg *msg)
 
Exceptions:
UnknownMsgException 


Protected Member Functions

void registerWatcher (const std::string &param)
 Register self as watcher for param.
void removeWatchers ()


Constructor & Destructor Documentation

virtual BaseListener::~BaseListener  )  [inline, virtual]
 

Definition at line 24 of file BaseListener.h.

00024 {}


Member Function Documentation

void BaseListener::receiveInt const IntMsg msg  )  [virtual]
 

Exceptions:
UnknownMsgException 

Definition at line 48 of file BaseListener.cpp.

00049 {
00050     throw UnknownMsgException(msg);
00051 }

void BaseListener::receiveSimple const SimpleMsg msg  )  [virtual]
 

Exceptions:
UnknownMsgException 

Reimplemented in Application, VideoAgent, and GameState.

Definition at line 39 of file BaseListener.cpp.

00040 {
00041     throw UnknownMsgException(msg);
00042 }

void BaseListener::receiveString const StringMsg msg  )  [virtual]
 

Exceptions:
UnknownMsgException 

Reimplemented in Application, OptionAgent, ScriptAgent, SoundAgent, VideoAgent, Pedometer, and MenuOptions.

Definition at line 57 of file BaseListener.cpp.

00058 {
00059     throw UnknownMsgException(msg);
00060 }

void BaseListener::registerWatcher const std::string &  param  )  [protected]
 

Register self as watcher for param.

String msg param_changed(param) will be send when param has changed.

Definition at line 23 of file BaseListener.cpp.

00024 {
00025     StringMsg *event = new StringMsg(this, "param_changed", param);
00026     OptionAgent::agent()->addWatcher(param, event);
00027 }

void BaseListener::removeWatchers  )  [protected]
 

Definition at line 30 of file BaseListener.cpp.

00031 {
00032     OptionAgent::agent()->removeWatchers(getName());
00033 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:54:40 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2