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

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

Base class for a listener for GUIdata changes on a Blackboard.

GUIdata listeners get called each time some GUIdata is updated. The Blackboard master is the central repository for GUIdata. A GUI may set some data (eg., move a module in the workspace) by communicating with its local blackboard, which will push the data to the master, then contacting bacl all listeners.

Definition at line 49 of file BlackboardGUIdataListener.H.

Inherited by NetworkCanvas.

Public Member Functions

 BlackboardGUIdataListener ()
 Constructor. More...
 
void activate ()
 Activate the listener (start listening) More...
 
void deactivate ()
 De-activate the listener (stop listening)
 
virtual ~BlackboardGUIdataListener ()
 Virtual destructor for safe inheritance. More...
 
virtual void onBlackboardGUIdata (std::string const &key, nrt::blackboard::GUIdata const &gd)=0
 Callback function called when new GUI data arrives. More...
 

Constructor & Destructor Documentation

nrt::BlackboardGUIdataListener::BlackboardGUIdataListener ( )

Constructor.

After construction, the listener needs to be activated by calling activate(). This is not done during construction as objects that derive from ParamChangeListener and overload onBlackboardGUIdata() 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::BlackboardGUIdataListener::~BlackboardGUIdataListener ( )
virtual

Virtual destructor for safe inheritance.

If needed, this will automatically deactivate() first.

Member Function Documentation

void nrt::BlackboardGUIdataListener::activate ( )

Activate the listener (start listening)

onBlackboardGUIdata() may be called immediately upon activation.

virtual void nrt::BlackboardGUIdataListener::onBlackboardGUIdata ( std::string const &  key,
nrt::blackboard::GUIdata const &  gd 
)
pure virtual

Callback function called when new GUI data arrives.

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


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