rpa::slice_generator< GeneratorValue > Class Template Reference

#include <common.h>

List of all members.

Public Member Functions

 slice_generator (const GeneratorValue &aGV)
void store (const GeneratorValue &aGV)
slice_generator snapshot (void) const
const GeneratorValue & value (void) const
 Non-atomic accessor, for when only one thread is there.
template<class Iter>
bool cas (typename atomic< Iter >::atomic_type *ItPtr, Iter ItOld, Iter ItNew, const slice_generator &SgOld, const slice_generator &SgNew)

Private Member Functions

 slice_generator ()

Private Attributes

atomic< GeneratorValue
>::atomic_type 
_Gen


Detailed Description

template<class GeneratorValue>
class rpa::slice_generator< GeneratorValue >

This can help to store a pointer to the latest created slice, for creating an atomic list of slice, or to atomically give a number to slices. The slices are uniquely defined by the value, whether it is a counter or a pointer. In other words, 'GeneratorValue' is a value uniquely identifying a slice, and which is atomically manipulated.


Constructor & Destructor Documentation

template<class GeneratorValue>
rpa::slice_generator< GeneratorValue >::slice_generator (  )  [private]

No default constructor : The construction is controlled by derived classes in the output sequences.

template<class GeneratorValue>
rpa::slice_generator< GeneratorValue >::slice_generator ( const GeneratorValue &  aGV  )  [inline]


Member Function Documentation

template<class GeneratorValue>
template<class Iter>
bool rpa::slice_generator< GeneratorValue >::cas ( typename atomic< Iter >::atomic_type *  ItPtr,
Iter  ItOld,
Iter  ItNew,
const slice_generator< GeneratorValue > &  SgOld,
const slice_generator< GeneratorValue > &  SgNew 
) [inline]

template<class GeneratorValue>
slice_generator rpa::slice_generator< GeneratorValue >::snapshot ( void   )  const [inline]

template<class GeneratorValue>
void rpa::slice_generator< GeneratorValue >::store ( const GeneratorValue &  aGV  )  [inline]

template<class GeneratorValue>
const GeneratorValue& rpa::slice_generator< GeneratorValue >::value ( void   )  const [inline]

Non-atomic accessor, for when only one thread is there.


Member Data Documentation

template<class GeneratorValue>
atomic< GeneratorValue >::atomic_type rpa::slice_generator< GeneratorValue >::_Gen [private]


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:36 2007 for rpa by  doxygen 1.4.7