lout::signal::Emitter Class Reference

The base class for signal emitters. More...

#include <signal.hh>

List of all members.

Public Member Functions

 Emitter ()
 ~Emitter ()
void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer.

Protected Member Functions

void emitVoid (int signalNo, int argc, Object **argv)
 Emit a void signal.
bool emitBool (int signalNo, int argc, Object **argv)
 Emit a boolean signal.
void connect (Receiver *receiver)
 Connect a receiver to the emitter.
virtual bool emitToReceiver (Receiver *receiver, int signalNo, int argc, Object **argv)=0
 A sub class must implement this for a call to a single receiver.

Private Member Functions

void unconnect (Receiver *receiver)

Private Attributes

container::typed::List
< Receiver > * 
receivers

Friends

class Receiver


Detailed Description

The base class for signal emitters.

If defining a signal group, a sub class of this class must be defined, with

There are two representations of signals:

See also:
signal

Constructor & Destructor Documentation

lout::signal::Emitter::Emitter (  ) 

References receivers.

lout::signal::Emitter::~Emitter (  ) 


Member Function Documentation

void lout::signal::Emitter::connect ( Receiver receiver  )  [protected]

bool lout::signal::Emitter::emitBool ( int  signalNo,
int  argc,
Object **  argv 
) [protected]

Emit a boolean signal.

This method should be called by a wrapper, which folds the signal, delegates the emission to here, and returns the same boolean value.

References emitToReceiver(), lout::container::typed::Collection< T >::iterator(), and receivers.

Referenced by dw::core::Layout::LinkEmitter::emitClick(), dw::core::Layout::LinkEmitter::emitEnter(), dw::core::Layout::LinkEmitter::emitPress(), and dw::core::Layout::LinkEmitter::emitRelease().

virtual bool lout::signal::Emitter::emitToReceiver ( Receiver receiver,
int  signalNo,
int  argc,
Object **  argv 
) [protected, pure virtual]

A sub class must implement this for a call to a single receiver.

This methods gets the signal in a folded representation, it has to unfold it, and pass it to a single receiver. For boolean signals, the return value of the receiver must be returned, for void signals, the return value is discarded.

Implemented in dw::core::Layout::LinkEmitter, dw::core::Layout::Emitter, dw::core::ui::Resource::ActivateEmitter, dw::core::ui::Resource::ClickedEmitter, and lout::signal::ObservedObject::DeletionEmitter.

Referenced by emitBool(), and emitVoid().

void lout::signal::Emitter::emitVoid ( int  signalNo,
int  argc,
Object **  argv 
) [protected]

void lout::signal::Emitter::intoStringBuffer ( misc::StringBuffer sb  )  [virtual]

void lout::signal::Emitter::unconnect ( Receiver receiver  )  [private]


Friends And Related Function Documentation

friend class Receiver [friend]


Member Data Documentation


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

Generated on Wed Sep 7 02:00:38 2011 for Dillo by  doxygen 1.5.9