CS::Utility::AtomicRefCount Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
CS::Utility::AtomicRefCount Class Reference

This is a class which provides basic atomic reference-counting semantics. More...

`#include <csutil/refcount.h>`

Inherited by CS::Threading::ThreadedJobQueue::ThreadState.

List of all members.

## Public Member Functions
void | DecRef ()
| Decrease the number of references to this object.
int | GetRefCount () const
| Get the reference count (only for debugging).
void | IncRef ()
| Increase the number of references to this object.
| AtomicRefCount ()
| Initialize object and set reference to 1.
| AtomicRefCount (const AtomicRefCount &other)
| Initialize object and set reference to 1.

## Detailed Description

This is a class which provides basic atomic reference-counting semantics.

It behaves like csRefCount, with the difference that the reference count is increased/decreased atomically, making this class suitable for using reference-counted objects across threads.

Definition at line 203 of file refcount.h.

## Constructor & Destructor Documentation

CS::Utility::AtomicRefCount::AtomicRefCount | ( |  | ) | `[inline]`

Initialize object and set reference to 1.

Definition at line 225 of file refcount.h.

CS::Utility::AtomicRefCount::AtomicRefCount | ( | const AtomicRefCount & | other | ) | `[inline]`

Initialize object and set reference to 1.

Definition at line 229 of file refcount.h.

## Member Function Documentation

void CS::Utility::AtomicRefCount::DecRef | ( |  | ) | `[inline]`

Decrease the number of references to this object.

Definition at line 242 of file refcount.h.

int CS::Utility::AtomicRefCount::GetRefCount | ( |  | ) | const`[inline]`

Get the reference count (only for debugging).

Definition at line 249 of file refcount.h.

void CS::Utility::AtomicRefCount::IncRef | ( |  | ) | `[inline]`

Increase the number of references to this object.

Definition at line 236 of file refcount.h.

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

- csutil/refcount.h