AbstractMotionReceiver Class Reference
[Main program]

Interface for motion receivers. More...

#include <AbstractMotionReceiver.h>

Inheritance diagram for AbstractMotionReceiver:

Inheritance graph
[legend]
Collaboration diagram for AbstractMotionReceiver:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractMotionReceiver ()
virtual ~AbstractMotionReceiver ()
bool addObserver (IMotionObserver *obs)
bool removeObserver (IMotionObserver *obs)
void notify (const Vector3d &v)
virtual void start ()=0
virtual void run ()=0
virtual void stop ()=0
const bool isRunning () const

Protected Member Functions

void setRunning (const bool run)


Detailed Description

Interface for motion receivers.

Interface for receiving motion events (from a wiimote or such)

Definition at line 13 of file AbstractMotionReceiver.h.


Constructor & Destructor Documentation

AbstractMotionReceiver::AbstractMotionReceiver (  ) 

Inits m_run with false, should be called by every child of AbstractMotionReceiver

Definition at line 7 of file AbstractMotionReceiver.cpp.

AbstractMotionReceiver::~AbstractMotionReceiver (  )  [virtual]

does nothing so far

Definition at line 12 of file AbstractMotionReceiver.cpp.


Member Function Documentation

bool AbstractMotionReceiver::addObserver ( IMotionObserver obs  ) 

Observer Pattern:

Adds observer to internal list

Definition at line 19 of file AbstractMotionReceiver.cpp.

const bool AbstractMotionReceiver::isRunning (  )  const [inline]

Returns:
true if the run is currently running

Definition at line 60 of file AbstractMotionReceiver.h.

void AbstractMotionReceiver::notify ( const Vector3d v  ) 

Observer Pattern: Notifies all Observers in List - children should call this in their run-methods

Parameters:
v Vector containing motion data
See also:
IMotionObserver::update

Definition at line 39 of file AbstractMotionReceiver.cpp.

bool AbstractMotionReceiver::removeObserver ( IMotionObserver obs  ) 

Observer Pattern: Removes observer from internal list

Definition at line 29 of file AbstractMotionReceiver.cpp.

virtual void AbstractMotionReceiver::run (  )  [pure virtual]

motion grabbing happens here

Implemented in CWiidMotionReceiver, RandomMotionReceiver, and WiiuseMotionReceiver.

void AbstractMotionReceiver::setRunning ( const bool  run  )  [inline, protected]

Parameters:
run true if run should run, false if not

Definition at line 66 of file AbstractMotionReceiver.h.

virtual void AbstractMotionReceiver::start (  )  [pure virtual]

initialization goes here

Implemented in CWiidMotionReceiver, RandomMotionReceiver, and WiiuseMotionReceiver.

virtual void AbstractMotionReceiver::stop (  )  [pure virtual]

deinitialization goes here

Implemented in CWiidMotionReceiver, RandomMotionReceiver, and WiiuseMotionReceiver.


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

Generated on Sun Nov 30 23:45:40 2008 for Modular Motion Processor by  doxygen 1.5.7.1