Tervel  1.0.0
A collection of wait-free containers and algorithms.
Public Member Functions | Private Attributes | List of all members
tervel::containers::lf::mcas_buffer::Node< T > Class Template Reference

#include <mcas_buffer.h>

Inheritance diagram for tervel::containers::lf::mcas_buffer::Node< T >:
tervel::util::Descriptor

Public Member Functions

 Node (T val)
 
 ~Node ()
 
value ()
 
void * complete (void *current, std::atomic< void * > *address)
 This method is implemented by each sub class and must guarantee that upon return that the descriptor no longer exists at the address it was placed. More...
 
void * get_logical_value ()
 This method is implemented by each sub class. More...
 
- Public Member Functions inherited from tervel::util::Descriptor
 Descriptor ()
 
virtual ~Descriptor ()
 
virtual bool on_watch (std::atomic< void * > *, void *)
 This method is optional to implement for each sub class. More...
 
virtual void on_unwatch ()
 This method must be implemented if on_watch is implemented, and is optional otherwise. More...
 
virtual bool on_is_watched ()
 This method is optional to implement for each sub class. More...
 

Private Attributes

const T val_
 

Constructor & Destructor Documentation

template<typename T>
tervel::containers::lf::mcas_buffer::Node< T >::Node ( val)
inlineexplicit
template<typename T>
tervel::containers::lf::mcas_buffer::Node< T >::~Node ( )
inline

Member Function Documentation

template<typename T>
void* tervel::containers::lf::mcas_buffer::Node< T >::complete ( void *  current,
std::atomic< void * > *  address 
)
inlinevirtual

This method is implemented by each sub class and must guarantee that upon return that the descriptor no longer exists at the address it was placed.

Parameters
currentthe reference to this object as it is at the address,
addressthe location this object was read from

Implements tervel::util::Descriptor.

template<typename T>
void* tervel::containers::lf::mcas_buffer::Node< T >::get_logical_value ( )
inlinevirtual

This method is implemented by each sub class.

It returns the logical value of the past address. If the associated operation is still in progress then it will generally return the value that was replaced by this descriptor. Otherwise it will generally return the result of the operation for the specified address.

It can only be called from the static function which protects the object from being reused during the function.

Implements tervel::util::Descriptor.

template<typename T>
T tervel::containers::lf::mcas_buffer::Node< T >::value ( )
inline

Member Data Documentation

template<typename T>
const T tervel::containers::lf::mcas_buffer::Node< T >::val_
private

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