sigx++  2.0.1
Data Structures | Public Member Functions | Friends
sigx::shared_dispatchable Class Reference

thread safe dispatcher reference that can be passed around. More...

#include <shared_dispatchable.h>

Inheritance diagram for sigx::shared_dispatchable:
sigx::dispatchable sigx::noncopyable

Data Structures

class  DispatcherPtr
 behaves like a dispatcher pointer, ensures threadsafe access to the dispatcher reference. More...
 

Public Member Functions

 shared_dispatchable ()
 
 shared_dispatchable (const dispatchable &d) throw ()
 Copy construct from any dispatchable. More...
 
shared_dispatchableoperator= (const dispatchable &d) throw ()
 Assign from any dispatchable. More...
 
- Public Member Functions inherited from sigx::dispatchable
void add_dispatcher_change_notify_callback (void *data, func_dispatcher_change_notify func) const
 
void remove_dispatcher_change_notify_callback (void *data) const
 

Friends

struct DispatcherPtr
 
class tunnel_validity_tracker
 

Additional Inherited Members

- Public Types inherited from sigx::dispatchable
typedef void(* func_dispatcher_change_notify )(void *)
 
- Protected Member Functions inherited from sigx::dispatchable
 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 inherited from sigx::dispatchable
internal::rwlockable_dispatcher_ptrm_disp_ptr
 

Detailed Description

thread safe dispatcher reference that can be passed around.

A shared dispatchable holds either a copy of another dispatchable or the dispatcher itself is only accessible by constructing a shared_dispatchable::DispatcherPtr.

Note
Multiple reads of the same object are threadsafe, multiple writes not:
// threadsafe
// not threadsafe
shareddisp = mydisp;

Constructor & Destructor Documentation

sigx::shared_dispatchable::shared_dispatchable ( )
Exceptions
Mightthrow a std::bad_alloc exception (from dispatchable's ctor)
sigx::shared_dispatchable::shared_dispatchable ( const dispatchable d)
throw (
)

Copy construct from any dispatchable.

Member Function Documentation

shared_dispatchable & sigx::shared_dispatchable::operator= ( const dispatchable d)
throw (
)

Assign from any dispatchable.

Friends And Related Function Documentation

friend struct DispatcherPtr
friend
friend class tunnel_validity_tracker
friend

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