template <class T> class TcAction

Abstract base template class for all Action classes

Public Classes

class Handler
Nested class Handler
Handler(bool autoRegister = true)
Default Constructor
virtual ~Handler()
Destructor
virtual int handleAction(const T& t)
Pure virtual member function

Public Methods

virtual ~TcAction()
Destructor
static void addHandler(Handler* aHandler)
This method will register an action handler for notification
static void removeHandler(Handler* aHandler)
This method will unregister an action handler
void broadcast()
This method will notify each registered action handler.
static void ts_addHandler(Handler* aHandler)
Thread safe version of addHandler.
static void ts_removeHandler(Handler* aHandler)
Thread safe version of removeHandler.
void ts_broadcast()
Thread safe version of broadcast.

Protected Methods

TcAction()
Constructor
static void ts_notify(TcAction<T>* t)
Thread safe version of notify.

Documentation

Abstract base template class for all Action classes. Clients must inherit from this class in order to define an Action.
class Handler
Nested class Handler. This class is a nested member class of each action class derived from TcAction. Action handlers are defined by inheriting from this nested class.

Handler(bool autoRegister = true)
Default Constructor. User can turn off automatic action handling. Default value sets up any class inheriting from Handler as an implicit action handler. Clients must implement int handleAction<const T& t); To turn off automatic action handling you would have code similar to the following in the constructor for an action handler: MyActionHandler::MyActionHandler() : MyAction::Handler(false) {}

virtual ~Handler()
Destructor

virtual int handleAction(const T& t)
Pure virtual member function. This method must be implemented by each Action Handler. It is called whenever a broadcast occurs for a given action.

virtual ~TcAction()
Destructor

static void addHandler(Handler* aHandler)
This method will register an action handler for notification. To turn on action handling you would call the static method MyAction::addHandler(&myActionHandler) where myActionHandler is an instance of MyActionHandler.

static void removeHandler(Handler* aHandler)
This method will unregister an action handler. To turn off action handling you would call the static method MyAction::removeHandler(&myActionHandler) where myActionHandler is an instance of MyActionHandler.

void broadcast()
This method will notify each registered action handler.

static void ts_addHandler(Handler* aHandler)
Thread safe version of addHandler.

static void ts_removeHandler(Handler* aHandler)
Thread safe version of removeHandler.

void ts_broadcast()
Thread safe version of broadcast.

TcAction()
Constructor. This makes TcAction an abstract base class.

static void ts_notify(TcAction<T>* t)
Thread safe version of notify.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de