IBR-DTNSuite  0.10
ibrcommon::ThreadsafeState< T > Class Template Reference

#include <ThreadsafeState.h>

Inheritance diagram for ibrcommon::ThreadsafeState< T >:
Inheritance graph
Collaboration diagram for ibrcommon::ThreadsafeState< T >:
Collaboration graph

Classes

class  Locked
 

Public Member Functions

 ThreadsafeState (T init, T final)
 
virtual ~ThreadsafeState ()
 
void reset (T init)
 
get () const
 
void wait (T st)
 
operator= (T st)
 
bool operator== (T st) const
 
bool operator!= (T st) const
 
Locked lock ()
 

Protected Attributes

_state
 
const T _final_state
 

Additional Inherited Members

- Protected Types inherited from ibrcommon::Mutex
enum  MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK }
 
- Protected Member Functions inherited from ibrcommon::Conditional
 Conditional ()
 
virtual ~Conditional ()
 
void signal (bool broadcast=false) throw ()
 
void wait (size_t timeout=0) throw (ConditionalAbortException)
 
void wait (struct timespec *ts) throw (ConditionalAbortException)
 
void abort () throw ()
 
void reset () throw ()
 
- Static Protected Member Functions inherited from ibrcommon::Conditional
static void gettimeout (size_t timeout, struct timespec *hires) throw ()
 

Detailed Description

template<class T>
class ibrcommon::ThreadsafeState< T >

Definition at line 31 of file ThreadsafeState.h.

Constructor & Destructor Documentation

template<class T>
ibrcommon::ThreadsafeState< T >::ThreadsafeState ( init,
final 
)
inline

Definition at line 38 of file ThreadsafeState.h.

template<class T>
virtual ibrcommon::ThreadsafeState< T >::~ThreadsafeState ( )
inlinevirtual

Definition at line 43 of file ThreadsafeState.h.

Member Function Documentation

template<class T>
T ibrcommon::ThreadsafeState< T >::get ( ) const
inline

Definition at line 55 of file ThreadsafeState.h.

Referenced by ibrcommon::JoinableThread::~JoinableThread().

template<class T>
Locked ibrcommon::ThreadsafeState< T >::lock ( )
inline
template<class T>
bool ibrcommon::ThreadsafeState< T >::operator!= ( st) const
inline

Definition at line 86 of file ThreadsafeState.h.

template<class T>
T ibrcommon::ThreadsafeState< T >::operator= ( st)
inline

Definition at line 70 of file ThreadsafeState.h.

template<class T>
bool ibrcommon::ThreadsafeState< T >::operator== ( st) const
inline

Definition at line 81 of file ThreadsafeState.h.

template<class T>
void ibrcommon::ThreadsafeState< T >::reset ( init)
inline

Definition at line 50 of file ThreadsafeState.h.

Referenced by ibrcommon::Thread::reset().

template<class T>
void ibrcommon::ThreadsafeState< T >::wait ( st)
inline

Definition at line 60 of file ThreadsafeState.h.

Referenced by ibrcommon::ThreadsafeState< THREAD_STATE >::wait().

Member Data Documentation


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