Flow-IPC 1.0.2
Flow-IPC project: Full implementation reference.
|
Simple counter that manually tracks utilization. It is not thread-safe. More...
#include <use_counted_object.hpp>
Public Member Functions | |
Use_counted_object () | |
Constructor. More... | |
unsigned int | get_use_count () const |
Returns the current usage. More... | |
void | increment_use () |
Increments the usage. More... | |
void | decrement_use () |
Decrements the usage. The current count must be greater than one. More... | |
Private Attributes | |
unsigned int | m_use_count |
The current usage count. More... | |
Simple counter that manually tracks utilization. It is not thread-safe.
Definition at line 27 of file use_counted_object.hpp.
ipc::util::Use_counted_object::Use_counted_object | ( | ) |
Constructor.
Definition at line 24 of file use_counted_object.cpp.
void ipc::util::Use_counted_object::decrement_use | ( | ) |
Decrements the usage. The current count must be greater than one.
Definition at line 39 of file use_counted_object.cpp.
References m_use_count.
unsigned int ipc::util::Use_counted_object::get_use_count | ( | ) | const |
Returns the current usage.
Definition at line 29 of file use_counted_object.cpp.
References m_use_count.
void ipc::util::Use_counted_object::increment_use | ( | ) |
|
private |
The current usage count.
Definition at line 54 of file use_counted_object.hpp.
Referenced by decrement_use(), get_use_count(), and increment_use().