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)
 
T operator= (T val) volatile
 Assign value. More...
 
T operator= (const Atomic &val) volatile
 
T operator++ () volatile
 Pre-increment, returns new value. More...
 
T operator++ (int) volatile
 Post-increment, returns initial value. More...
 
T operator-- () volatile
 Pre-decrement, returns new value. More...
 
T operator-- (int) volatile
 Post-decrement, returns initial value. More...
 
T operator+= (T rhs) volatile
 Add and return new value. More...
 
T operator-= (T rhs) volatile
 Sub and return new value. More...
 
T operator&= (T rhs) volatile
 And and return new value. More...
 
T operator|= (T rhs) volatile
 Or and return new value. More...
 
T 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
 
T load (Order o=Order::seqCst) const volatile
 
T add (T rhs, Order o=Order::seqCst) volatile
 
T sub (T rhs, Order o=Order::seqCst) volatile
 
T and_ (T rhs, Order o=Order::seqCst) volatile
 
T or_ (T rhs, Order o=Order::seqCst) volatile
 
T 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 ( T  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 ( T  rhs,
Order  o = Order::seqCst 
) volatile
inline
template<class T >
T honey::Atomic< T, true >::and_ ( T  rhs,
Order  o = Order::seqCst 
) volatile
inline
template<class T >
bool honey::Atomic< T, true >::cas ( T  newVal,
T  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&= ( T  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+= ( T  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-= ( T  rhs) volatile
inline

Sub and return new value.

template<class T >
T honey::Atomic< T, true >::operator= ( T  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^= ( T  rhs) volatile
inline

Xor and return new value.

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

Or and return new value.

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

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