Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXAtomicInt Class Reference

An atomically modifyable integer. More...

#include <FXAtomic.h>

List of all members.

Public Member Functions

 FXAtomicInt (FXint v=0)
FXAtomicIntoperator= (FXint v)
 operator FXint () const
FXint get () const
FXint set (FXint v)
FXint cas (FXint expect, FXint v)
FXAtomicIntoperator+= (FXint v)
FXAtomicIntoperator-= (FXint v)
FXAtomicIntoperator|= (FXint v)
FXAtomicIntoperator &= (FXint v)
FXAtomicIntoperator^= (FXint v)
FXint operator++ ()
FXint operator-- ()
int operator++ (FXint)
FXint operator-- (FXint)


Detailed Description

An atomically modifyable integer.

Constructor & Destructor Documentation

FX::FXAtomicInt::FXAtomicInt ( FXint  v = 0  )  [inline]

Constructs an atomic integer with a given initial value.


Member Function Documentation

FXAtomicInt& FX::FXAtomicInt::operator= ( FXint  v  )  [inline]

Assign from value.

FX::FXAtomicInt::operator FXint (  )  const [inline]

Returns current value of the integer.

FXint FX::FXAtomicInt::get (  )  const [inline]

Returns current value of the integer.

FXint FX::FXAtomicInt::set ( FXint  v  )  [inline]

Set variable to v; return old value.

FXint FX::FXAtomicInt::cas ( FXint  expect,
FXint  v 
) [inline]

If variable is equal to expect, set it to v; returns old value.

FXAtomicInt& FX::FXAtomicInt::operator+= ( FXint  v  )  [inline]

Atomically add v to the variable.

FXAtomicInt& FX::FXAtomicInt::operator-= ( FXint  v  )  [inline]

Atomically substract v from the variable.

FXAtomicInt& FX::FXAtomicInt::operator|= ( FXint  v  )  [inline]

Atomically bitwise-or v to the variable.

FXAtomicInt& FX::FXAtomicInt::operator &= ( FXint  v  )  [inline]

Atomically bitwise-and v to the variable.

FXAtomicInt& FX::FXAtomicInt::operator^= ( FXint  v  )  [inline]

Atomically bitwise-xor v to the variable.

FXint FX::FXAtomicInt::operator++ (  )  [inline]

Atomically increment the integer, prefix version.

FXint FX::FXAtomicInt::operator-- (  )  [inline]

Atomically decrement the integer, prefix version.

int FX::FXAtomicInt::operator++ ( FXint   )  [inline]

Atomically increment value, postfix version.

FXint FX::FXAtomicInt::operator-- ( FXint   )  [inline]

Atomically decrement value, postfix version.

Copyright © 1997-2010 Jeroen van der Zijp