OOFILE  1.9
Public Member Functions | List of all members
oofReceiver Class Referenceabstract

Generic receiver for messaging. More...

#include <oofmsg.h>

Inheritance diagram for oofReceiver:
Inheritance graph
[legend]

Public Member Functions

 oofReceiver ()
 
virtual bool receiveMsg (OOFmsgT msg, unsigned long senderDefined)=0
 
virtual void subscribeTo (oofBroadcaster *)
 
virtual void unsubscribe (oofBroadcaster *)
 
virtual ~oofReceiver ()
 

Detailed Description

Generic receiver for messaging.

Warning
If you subclass oofReceiver and override receiveMsg you MUST be careful about destruction order of anything you're subscribed to, or detect OOFmsg_BroadcasterClosing and set appropriate flags so you don't later attempt to unsubscribe..
See also
oofBroadcaster

Definition at line 112 of file oofmsg.h.

Constructor & Destructor Documentation

oofReceiver::oofReceiver ( )
inline

Definition at line 114 of file oofmsg.h.

oofReceiver::~oofReceiver ( )
virtual

Definition at line 217 of file oofmsg.cpp.

Member Function Documentation

virtual bool oofReceiver::receiveMsg ( OOFmsgT  msg,
unsigned long  senderDefined 
)
pure virtual
void oofReceiver::subscribeTo ( oofBroadcaster broad)
virtual

Reimplemented in oofSingleListener.

Definition at line 223 of file oofmsg.cpp.

References oofBroadcaster::addReceiver().

void oofReceiver::unsubscribe ( oofBroadcaster broad)
virtual

Reimplemented in oofSingleListener.

Definition at line 231 of file oofmsg.cpp.

References oofBroadcaster::removeReceiver().

Referenced by oofSingleListener::subscribeTo(), and oofSingleListener::unsubscribe().


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