Codemesh Runtime v3 C++ API Reference  3.9.205
Public Member Functions | List of all members
xmog_atomic_pointer Class Reference

A utility class for thread safe compare exchange of pointer values. More...

#include <xmog_atomic_pointer.h>

Public Member Functions

 xmog_atomic_pointer ()
 Creates a pointer that is initialized to NULL.
 
 xmog_atomic_pointer (void *p)
 Creates a pointer that is initialized to the given value. More...
 
 xmog_atomic_pointer (const xmog_atomic_pointer &_rhs)
 Creates a pointer that is initialized to the same value as the given pointer. More...
 
void * value () const
 Returns the pointer's value.
 
int operator== (void *_rhs) const
 Compares the instance to a pointer value for equality. More...
 
int operator!= (void *_rhs) const
 Compares the instance to a pointer value for inequality. More...
 
xmog_atomic_pointeroperator= (void *_rhs)
 Assigns a new value to the pointer. More...
 
xmog_atomic_pointeroperator= (xmog_atomic_pointer &_rhs)
 Performs an exchange operation between the two pointers. More...
 

Detailed Description

A utility class for thread safe compare exchange of pointer values.

Constructor & Destructor Documentation

◆ xmog_atomic_pointer() [1/2]

xmog_atomic_pointer::xmog_atomic_pointer ( void *  p)
inline

Creates a pointer that is initialized to the given value.

Parameters
pthe pointer value.

◆ xmog_atomic_pointer() [2/2]

xmog_atomic_pointer::xmog_atomic_pointer ( const xmog_atomic_pointer _rhs)
inline

Creates a pointer that is initialized to the same value as the given pointer.

Parameters
_rhsan other pointer.

Member Function Documentation

◆ operator!=()

int xmog_atomic_pointer::operator!= ( void *  _rhs) const
inline

Compares the instance to a pointer value for inequality.

Parameters
_rhsthe value to compare to.

◆ operator=() [1/2]

xmog_atomic_pointer& xmog_atomic_pointer::operator= ( void *  _rhs)

Assigns a new value to the pointer.

Parameters
_rhsthe value to assign.

◆ operator=() [2/2]

xmog_atomic_pointer& xmog_atomic_pointer::operator= ( xmog_atomic_pointer _rhs)

Performs an exchange operation between the two pointers.

Parameters
_rhsthe otehr value.

◆ operator==()

int xmog_atomic_pointer::operator== ( void *  _rhs) const
inline

Compares the instance to a pointer value for equality.

Parameters
_rhsthe value to compare to.

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

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.