iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::RunStateActionListener Class Referenceabstract

#include <nrt/Core/Blackboard/RunStateActionListener.H>

Listener that will be triggered on each update of the Blackboard federation's run state.

Definition at line 48 of file RunStateActionListener.H.

Inherited by MainWindow.

Public Member Functions

 RunStateActionListener ()
 Constructor. More...
 
void activate ()
 Activate the listener (start listening) More...
 
void deactivate ()
 De-activate the listener (stop listening)
 
virtual ~RunStateActionListener ()
 Virtual destructor for safe inheritance. More...
 
virtual void preRunStateAction (nrt::RunStateAction const a)=0
 Callback function called just before each RunStateAction is taken. More...
 
virtual void postRunStateAction (nrt::RunStateAction const a)=0
 Callback function called just after each RunStateAction is taken. More...
 

Constructor & Destructor Documentation

nrt::RunStateActionListener::RunStateActionListener ( )

Constructor.

After construction, the listener needs to be activated by calling activate(). This is not done during construction as objects that derive from RunStateActionListener and overload update() will not be fully constructed yet by the time the base class constructor is invoked, which would result in a pure virtual function called fatal error.

virtual nrt::RunStateActionListener::~RunStateActionListener ( )
virtual

Virtual destructor for safe inheritance.

Upon destruction, the listener will automatically un-register itself with the Blackboard federation and stop listening

Member Function Documentation

void nrt::RunStateActionListener::activate ( )

Activate the listener (start listening)

postAction() will be called immediately upon activation with the current state of the federation.

virtual void nrt::RunStateActionListener::preRunStateAction ( nrt::RunStateAction const  a)
pure virtual

Callback function called just before each RunStateAction is taken.

Derived classes must overload this function and take the desired action upon update.

virtual void nrt::RunStateActionListener::postRunStateAction ( nrt::RunStateAction const  a)
pure virtual

Callback function called just after each RunStateAction is taken.

Derived classes must overload this function and take the desired action upon update.


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