rutz::unsafe_atomic_int Class Reference

Thread-UNSAFE integer class. More...

#include <rutz/atomic_unsafe.h>

List of all members.

Public Member Functions

 unsafe_atomic_int ()
 Construct with an initial value of 0.
int atomic_get () const
 Get the current value.
void atomic_set (int v)
 Set value to the given value v.
void atomic_add (int i)
 Add v to the value.
void atomic_sub (int i)
 Subtract v from the value.
bool atomic_sub_test_zero (int i)
 Subtract v from the value; return true if the new value is zero.
void atomic_incr ()
 Increment the value by one.
void atomic_decr ()
 Decrement the value by one.
bool atomic_decr_test_zero ()
 Decrement the value by one; return true if the new value is zero.
bool atomic_incr_test_zero ()
 Increment the value by one; return true if the new value is zero.
int atomic_add_return (int i)
 Add v to the value and return the new value.
int atomic_sub_return (int i)
 Subtract v from the value and return the new value.
int atomic_incr_return ()
 Increment the value by one and return the new value.
int atomic_decr_return ()
 Decrement the value by one and return the new value.

Static Public Member Functions

static int max_value ()
 Get the maximum representable value.


Detailed Description

Thread-UNSAFE integer class.

Definition at line 42 of file atomic_unsafe.h.


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

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:32 2008 by Doxygen version 1.5.5.