gloox  1.0.9
Public Member Functions | List of all members
AtomicRefCount Class Reference

#include <atomicrefcount.h>

Public Member Functions

 AtomicRefCount ()
int increment ()
int decrement ()
void reset ()

Detailed Description

A simple implementation of a thread safe 32-bit reference count. Native functions are used where possible. When not available, a mutex is used for locking and unlocking.

Author
Daniel Bowen
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0.1

Definition at line 34 of file atomicrefcount.h.

Constructor & Destructor Documentation

Contructs a new atomic reference count.

Definition at line 37 of file atomicrefcount.cpp.

Member Function Documentation

int decrement ( )

Decrements the reference count, and returns the new value.

Returns
The new value.

Definition at line 58 of file atomicrefcount.cpp.

int increment ( )

Increments the reference count, and returns the new value.

Returns
The new value.

Definition at line 42 of file atomicrefcount.cpp.

void reset ( )

Resets the reference count to zero.

Since
1.0.4

Definition at line 74 of file atomicrefcount.cpp.


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