# boost::lockfree::tagged_ptr< T > Class Template Reference

List of all members.

## Detailed Description

### template<class T>
class boost::lockfree::tagged_ptr< T >

Definition at line 25 of file tagged_ptr_dcas.hpp.

## Public Types

typedef std::size_t | tag_t

## Public Member Functions

| tagged_ptr (void)
| tagged_ptr (tagged_ptr const &p)
| tagged_ptr (T *p, tag_t t=0)
void | operator= (tagged_ptr const &p)
void | atomic_set (tagged_ptr const &p)
void | atomic_set (T *p, tag_t t)
void | set (tagged_ptr const &p)
void | set (T *p, tag_t t)
bool | operator== (tagged_ptr const &p) const
bool | operator!= (tagged_ptr const &p) const
T * | get_ptr () const
void | set_ptr (T *p)
tag_t | get_tag () const
void | set_tag (tag_t t)
bool | cas (tagged_ptr const &oldval, T *newptr)
bool | cas (tagged_ptr const &oldval, T *newptr, tag_t t)
T & | operator * () const
T * | operator-> () const
| operator bool (void) const

## Static Public Attributes

static const bool | is_lockfree = boost::lockfree::atomic_cas<tagged_ptr>::is_lockfree

## Protected Attributes

T * | ptr
tag_t | tag

## Constructor & Destructor Documentation

template<class T>

boost::lockfree::tagged_ptr< T >::tagged_ptr | ( | void |  | ) | `[inline]`

uninitialized constructor

Definition at line 33 of file tagged_ptr_dcas.hpp.

template<class T>

boost::lockfree::tagged_ptr< T >::tagged_ptr | ( | tagged_ptr< T > const & | p | ) | `[inline]`

copy constructor

Definition at line 37 of file tagged_ptr_dcas.hpp.

## Member Function Documentation

template<class T>

bool boost::lockfree::tagged_ptr< T >::cas | ( | tagged_ptr< T > const & | oldval,
|  | T * | newptr |
| ) |  |  | `[inline]`

compare and swap

Definition at line 133 of file tagged_ptr_dcas.hpp.

Referenced by boost::lockfree::static_freelist< T, Alloc >::allocate(), boost::lockfree::caching_freelist< T, Alloc >::allocate(), boost::lockfree::freelist< T, maximum_size, Alloc >::allocate(), boost::lockfree::detail::fifo< T *, freelist_t, Alloc >::dequeue(), pion::PionLockFreeQueue< T >::push(), and boost::lockfree::stack< T, freelist_t, Alloc >::push().

template<class T>

T* boost::lockfree::tagged_ptr< T >::get_ptr | ( |  | ) | const`[inline]`

pointer access

Definition at line 107 of file tagged_ptr_dcas.hpp.

Referenced by pion::PionLockFreeQueue< T >::clear(), boost::lockfree::detail::fifo< T *, freelist_t, Alloc >::dequeue(), pion::PionLockFreeQueue< T >::empty(), boost::lockfree::detail::fifo< T *, freelist_t, Alloc >::empty(), boost::lockfree::detail::fifo< T *, freelist_t, Alloc >::enqueue(), pion::PionLockFreeQueue< T >::pop(), pion::PionLockFreeQueue< T >::push(), boost::lockfree::stack< T, freelist_t, Alloc >::push(), boost::lockfree::detail::fifo< T *, freelist_t, Alloc >::~fifo(), and pion::PionLockFreeQueue< T >::~PionLockFreeQueue().

template<class T>

tag_t boost::lockfree::tagged_ptr< T >::get_tag | ( |  | ) | const`[inline]`

tag access

Definition at line 120 of file tagged_ptr_dcas.hpp.

template<class T>

T& boost::lockfree::tagged_ptr< T >::operator * | ( |  | ) | const`[inline]`

smart pointer support

Definition at line 147 of file tagged_ptr_dcas.hpp.

template<class T>

void boost::lockfree::tagged_ptr< T >::operator= | ( | tagged_ptr< T > const & | p | ) | `[inline]`

atomic set operations

Definition at line 48 of file tagged_ptr_dcas.hpp.

template<class T>

bool boost::lockfree::tagged_ptr< T >::operator== | ( | tagged_ptr< T > const & | p | ) | const`[inline]`

comparing semantics

Definition at line 94 of file tagged_ptr_dcas.hpp.

template<class T>

void boost::lockfree::tagged_ptr< T >::set | ( | tagged_ptr< T > const & | p | ) | `[inline]`

unsafe set operation

Definition at line 79 of file tagged_ptr_dcas.hpp.

Referenced by boost::lockfree::stack< T, freelist_t, Alloc >::push().

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

- common/include/boost/lockfree/detail/tagged_ptr_dcas.hpp