eq::base::Atomic< T > Class Template Reference

An variable with atomic operations. More...

#include <atomic.h>

Inheritance diagram for eq::base::Atomic< T >:

Inheritance graph
[legend]
Collaboration diagram for eq::base::Atomic< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Atomic (T v=0)
 Construct a new atomic variable with an initial value.
 operator T (void) const
void operator= (T v)
 Assign a new value.
operator+= (T v)
 Atomically add a value and return the new value.
operator-= (T v)
 Atomically substract a value and return the new value.
operator++ (void)
 Atomically increment by one and return the new value.
operator-- (void)
 Atomically decrement by one and return the new value.
operator++ (int)
 Atomically increment by one and return the old value.
operator-- (int)
 Atomically decrement by one and return the old value.


Detailed Description

template<typename T>
class eq::base::Atomic< T >

An variable with atomic operations.

Definition at line 29 of file atomic.h.


Constructor & Destructor Documentation

template<typename T>
eq::base::Atomic< T >::Atomic ( v = 0  )  [inline, explicit]

Construct a new atomic variable with an initial value.

Definition at line 33 of file atomic.h.


Member Function Documentation

template<typename T>
eq::base::Atomic< T >::operator T ( void   )  const [inline]

Returns:
the current value

Definition at line 38 of file atomic.h.

template<typename T>
T eq::base::Atomic< T >::operator+= ( v  )  [inline]

Atomically add a value and return the new value.

Definition at line 51 of file atomic.h.

template<typename T>
T eq::base::Atomic< T >::operator-= ( v  )  [inline]

Atomically substract a value and return the new value.

Definition at line 57 of file atomic.h.

template<typename T>
T eq::base::Atomic< T >::operator++ ( void   )  [inline]

Atomically increment by one and return the new value.

Definition at line 63 of file atomic.h.

template<typename T>
T eq::base::Atomic< T >::operator-- ( void   )  [inline]

Atomically decrement by one and return the new value.

Definition at line 69 of file atomic.h.

template<typename T>
T eq::base::Atomic< T >::operator++ ( int   )  [inline]

Atomically increment by one and return the old value.

Definition at line 75 of file atomic.h.

template<typename T>
T eq::base::Atomic< T >::operator-- ( int   )  [inline]

Atomically decrement by one and return the old value.

Definition at line 81 of file atomic.h.


The documentation for this class was generated from the following file:
Generated on Mon Aug 10 18:58:43 2009 for Equalizer 0.9 by  doxygen 1.5.8