Scoped reference counter, which takes an unsigned integer value as argument on construction to track.
More...
#include <kanzi/core/util/scoped_ref_counter.hpp>
Scoped reference counter, which takes an unsigned integer value as argument on construction to track.
Use the class to guard incremental calls on an object.
kanzi::ScopedRefCounter::ScopedRefCounter |
( |
size_t & |
counter | ) |
|
|
inlineexplicit |
Constructs the reference counter and increments its value.
- Parameters
-
counter | Reference to the counter to track. |
kanzi::ScopedRefCounter::~ScopedRefCounter |
( |
| ) |
|
|
inline |
Destroys the reference counter and decrements the tracked counter.
size_t kanzi::ScopedRefCounter::count |
( |
| ) |
const |
|
inline |
Returns the reference counter tracked.
The documentation for this class was generated from the following file: