InputHandler Class Reference

Auxiliary class that can override parts of SingleChannel's functionality. More...

#include <Channels/InputHandler.H>

Inheritance diagram for InputHandler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void handleInput (SingleChannel &chan, const Image< float > &bwimg, const SimTime &t, const Image< byte > &clipMask, const rutz::shared_ptr< PyramidCache< float > > &cache)=0
virtual void waitForOutput (SingleChannel &chan)=0

Static Public Member Functions

static rutz::shared_ptr
< InputHandler
clone (rutz::shared_ptr< InputHandler > h)
 Like h->makeClone(), but works with null pointers, too.

Detailed Description

Auxiliary class that can override parts of SingleChannel's functionality.

Definition at line 51 of file InputHandler.H.


Member Function Documentation

rutz::shared_ptr< InputHandler > InputHandler::clone ( rutz::shared_ptr< InputHandler h  )  [static]

Like h->makeClone(), but works with null pointers, too.

The point of this is to allow us to pass one InputHandler to a ComplexChannel, and then let that ComplexChannel make multiple clones of the handler to pass to each of its subchannels. This means that there may be many clones of a given InputHandler, but only some of them (i.e., the ones sitting in SingleChannel objects) will ever see any input; the other ones (sitting in ComplexChannel objects) won't be used except to instantiate additional clones when needed. In terms of implementation, this means that InputHandler classes shouldn't do anything "heavy" until they actually receive some input. Along those lines, the prototypical InputHandler subclass is the beowulf BeoInputHandler, which doesn't do a Beowulf::requestNode() in its constructor, but rather waits until it gets a handleInput() call. That way it is safe to have more BeoInputHandler objects than we have Beowulf nodes, as long as only a subset of the objects actually request Beowulf nodes.

Definition at line 51 of file InputHandler.C.

References rutz::shared_ptr< T >::is_valid().

Referenced by SingleChannel::cloneInputHandler(), and SingleChannel::setInputHandler().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:23 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3