sigx++
2.0.1
|
Derived classes designate their ability to dispatch messages over a sigx::dispatcher. More...
#include <dispatchable.h>
Public Types | |
typedef void(* | func_dispatcher_change_notify )(void *) |
Public Member Functions | |
void | add_dispatcher_change_notify_callback (void *data, func_dispatcher_change_notify func) const |
void | remove_dispatcher_change_notify_callback (void *data) const |
Protected Member Functions | |
dispatchable () | |
~dispatchable () throw () | |
void | invalidate_tunnels () |
Invalidate those tunnels (and disconnect them from signals) that have registered themselves with add_dispatcher_change_notify_callback() when the validity tracking was activated. More... | |
dispatcher_ptr | dispatcher () const throw () |
non-volatile access to the dispatcher pointer in the current thread More... | |
Protected Attributes | |
internal::rwlockable_dispatcher_ptr * | m_disp_ptr |
Friends | |
class | shared_dispatchable |
Additional Inherited Members |
Derived classes designate their ability to dispatch messages over a sigx::dispatcher.
This class holds just a thread safe pointer to a dispatcher.
typedef void(* sigx::dispatchable::func_dispatcher_change_notify)(void *) |
|
protected |
Might | throw a std::bad_alloc exception |
References m_disp_ptr.
|
protected |
void sigx::dispatchable::add_dispatcher_change_notify_callback | ( | void * | data, |
func_dispatcher_change_notify | func | ||
) | const |
Add a callback that is executed (notified) when the dispatcher is changed.
data | Passed into func upon notification. |
func | Callback executed upon destruction of the object. |
Referenced by sigx::tunnel_validity_tracker::activate().
|
inlineprotected |
non-volatile access to the dispatcher pointer in the current thread
Referenced by sigx::tunnel_validity_tracker::activate(), and sigx::manual_dispatchable::~manual_dispatchable().
|
protected |
Invalidate those tunnels (and disconnect them from signals) that have registered themselves with add_dispatcher_change_notify_callback() when the validity tracking was activated.
Referenced by sigx::manual_dispatchable::set_dispatcher(), sigx::auto_dispatchable::~auto_dispatchable(), and sigx::manual_dispatchable::~manual_dispatchable().
void sigx::dispatchable::remove_dispatcher_change_notify_callback | ( | void * | data) | const |
Remove a callback previously installed with add_dispatcher_change_notify_callback(). The callback is not executed.
data | Parameter passed into previous call to add_dispatcher_change_notify_callback(). |
|
friend |
|
protected |