Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

at::AtomicExchange_Val< w_type > Class Template Reference

#include <at_atomic.h>

Inheritance diagram for at::AtomicExchange_Val< w_type >:

Inheritance graph
[legend]
List of all members.

Public Methods

 AtomicExchange_Val (w_type i_init_val)
 AtomicExchange_Val ()
w_type Get () const
w_type Exchange (w_type i_val)
w_type CompareExchange (w_type i_val, w_type i_compare)

Detailed Description

template<typename w_type>
class at::AtomicExchange_Val< w_type >

This will exchange object inside the AtomicExchangeVal class with the object a different one. This is ONLY USEFUL FOR POD types. This will not work for anything but values that are the same as the size of int.


Constructor & Destructor Documentation

template<typename w_type>
at::AtomicExchange_Val< w_type >::AtomicExchange_Val w_type    i_init_val [inline]
 

AtomicExchange_Val contructor takes a w_type to initialize this.

Parameters:
i_init_val  the initial value for this object

template<typename w_type>
at::AtomicExchange_Val< w_type >::AtomicExchange_Val   [inline]
 


Member Function Documentation

template<typename w_type>
w_type at::AtomicExchange_Val< w_type >::CompareExchange w_type    i_val,
w_type    i_compare
[inline]
 

CompareExchange will swap the contents of this object with the passed in using the architecture specific atomic compare exchange mechanisms. This tests that the current value compares equal to i_compare before performing the exchange.

Parameters:
i_val  the new value for this object
Returns:
nothing

template<typename w_type>
w_type at::AtomicExchange_Val< w_type >::Exchange w_type    i_val [inline]
 

Exchange will swap the contents of this object with the one passed in using the architecture specific atomic exchange mechanisms.

Parameters:
i_val  the new value for this object
Returns:
the previous value contained in this object

template<typename w_type>
w_type at::AtomicExchange_Val< w_type >::Get   const [inline]
 

Get will return the value of the pointer

Returns:
the current value.


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

Generated for Austria by doxygen and MakeXS at Sun Oct 24 17:35:34 PDT 2004