Base class for reference counted objects. More...
#include <referencecounted.hpp>
Public Member Functions | |
| ReferenceCounted (boost::int32_t initValue) throw () | |
| Create a new reference counted object. | |
| void | ref () |
| Atomically inrement reference count by one. | |
| bool | deref () |
| Atomically decrement reference count by one. | |
| bool | isUnreferenced () |
| Atomically checks if there is no reference. | |
| bool | isUnique () |
| Atomically checks if there is exactly one reference. | |
Base class for reference counted objects.
This class is a simple wrapper around an atomic counter and provides the methods ref() and deref().
ReferenceCounted is neither copyable nor assignable.
Definition at line 45 of file referencecounted.hpp.
| bool acedia::ReferenceCounted::deref | ( | ) | [inline] |
Atomically decrement reference count by one.
Definition at line 70 of file referencecounted.hpp.
| bool acedia::ReferenceCounted::isUnique | ( | ) | [inline] |
Atomically checks if there is exactly one reference.
Definition at line 84 of file referencecounted.hpp.
| bool acedia::ReferenceCounted::isUnreferenced | ( | ) | [inline] |
Atomically checks if there is no reference.
Definition at line 77 of file referencecounted.hpp.
1.6.2