Honeycomb  0.1
Component-Model Framework
Public Member Functions | List of all members
honey::Atomic< T, true > Class Template Reference

Wrapper around integral type to make all operations atomic and sequentially consistent. More...

#include <Atomic.h>

Public Member Functions

 Atomic ()=default
 
 Atomic (T val)
 
 Atomic (const Atomic &val)
 
operator= (T val) volatile
 Assign value. More...
 
operator= (const Atomic &val) volatile
 
operator++ () volatile
 Pre-increment, returns new value. More...
 
operator++ (int) volatile
 Post-increment, returns initial value. More...
 
operator-- () volatile
 Pre-decrement, returns new value. More...
 
operator-- (int) volatile
 Post-decrement, returns initial value. More...
 
operator+= (T rhs) volatile
 Add and return new value. More...
 
operator-= (T rhs) volatile
 Sub and return new value. More...
 
operator&= (T rhs) volatile
 And and return new value. More...
 
operator|= (T rhs) volatile
 Or and return new value. More...
 
operator^= (T rhs) volatile
 Xor and return new value. More...
 
 operator T () const volatile
 Read value. More...
 
void store (T val, Order o=Order::seqCst) volatile
 
load (Order o=Order::seqCst) const volatile
 
add (T rhs, Order o=Order::seqCst) volatile
 
sub (T rhs, Order o=Order::seqCst) volatile
 
and_ (T rhs, Order o=Order::seqCst) volatile
 
or_ (T rhs, Order o=Order::seqCst) volatile
 
xor_ (T rhs, Order o=Order::seqCst) volatile
 
bool cas (T newVal, T cmp, Order o=Order::seqCst) volatile
 Compare and swap. If atomic is equal to comparand cmp then atomic is assigned to newVal and true is returned. Returns false otherwise. More...
 

Detailed Description

template<class T>
class honey::Atomic< T, true >

Wrapper around integral type to make all operations atomic and sequentially consistent.

Constructor & Destructor Documentation

template<class T >
honey::Atomic< T, true >::Atomic ( )
default
template<class T >
honey::Atomic< T, true >::Atomic ( val)
inline
template<class T >
honey::Atomic< T, true >::Atomic ( const Atomic< T, true > &  val)
inline

Member Function Documentation

template<class T >
T honey::Atomic< T, true >::add ( rhs,
Order  o = Order::seqCst 
) volatile
inline
template<class T >
T honey::Atomic< T, true >::and_ ( rhs,
Order  o = Order::seqCst 
) volatile
inline
template<class T >
bool honey::Atomic< T, true >::cas ( newVal,
cmp,
Order  o = Order::seqCst 
) volatile
inline

Compare and swap. If atomic is equal to comparand cmp then atomic is assigned to newVal and true is returned. Returns false otherwise.

template<class T >
T honey::Atomic< T, true >::load ( Order  o = Order::seqCst) const volatile
inline
template<class T >
honey::Atomic< T, true >::operator T ( ) const volatile
inline

Read value.

template<class T >
T honey::Atomic< T, true >::operator&= ( rhs) volatile
inline

And and return new value.

template<class T >
T honey::Atomic< T, true >::operator++ ( ) volatile
inline

Pre-increment, returns new value.

template<class T >
T honey::Atomic< T, true >::operator++ ( int  ) volatile
inline

Post-increment, returns initial value.

template<class T >
T honey::Atomic< T, true >::operator+= ( rhs) volatile
inline

Add and return new value.

template<class T >
T honey::Atomic< T, true >::operator-- ( ) volatile
inline

Pre-decrement, returns new value.

template<class T >
T honey::Atomic< T, true >::operator-- ( int  ) volatile
inline

Post-decrement, returns initial value.

template<class T >
T honey::Atomic< T, true >::operator-= ( rhs) volatile
inline

Sub and return new value.

template<class T >
T honey::Atomic< T, true >::operator= ( val) volatile
inline

Assign value.

template<class T >
T honey::Atomic< T, true >::operator= ( const Atomic< T, true > &  val) volatile
inline
template<class T >
T honey::Atomic< T, true >::operator^= ( rhs) volatile
inline

Xor and return new value.

template<class T >
T honey::Atomic< T, true >::operator|= ( rhs) volatile
inline

Or and return new value.

template<class T >
T honey::Atomic< T, true >::or_ ( rhs,
Order  o = Order::seqCst 
) volatile
inline
template<class T >
void honey::Atomic< T, true >::store ( val,
Order  o = Order::seqCst 
) volatile
inline
template<class T >
T honey::Atomic< T, true >::sub ( rhs,
Order  o = Order::seqCst 
) volatile
inline
template<class T >
T honey::Atomic< T, true >::xor_ ( rhs,
Order  o = Order::seqCst 
) volatile
inline

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