sigx::shared_dispatchable Class Reference
[Dispatching]

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.
shared_dispatchableoperator= (const dispatchable &d) throw ()
 Assign from any dispatchable.

Friends

struct DispatcherPtr
class tunnel_validity_tracker

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
    shared_dispatchable::DispatcherPtr dispatcher(shareddisp);
    
    // not threadsafe
    shareddisp = mydisp;

Constructor & Destructor Documentation

sigx::shared_dispatchable::shared_dispatchable (  ) 

Exceptions:
Might throw 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.

Reimplemented from sigx::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:

Generated on Mon Aug 3 17:35:09 2009 for sigx++ by  doxygen 1.5.9