A simple reference counter, keep track of a number of users. More...
#include <BulkAllocator.h>
Public Types | |
typedef unsigned int | Counter_t |
type of user counter More... | |
Public Member Functions | |
bool | hasUsers () const |
Returns whether there are currently users. More... | |
Counter_t | Count () const |
Returns the number of registered users. More... | |
void | AddUser () |
Adds a user to the users count. More... | |
bool | RemoveUser () |
Removed a user to the users count; returns false if no user yet. More... | |
Private Attributes | |
Counter_t | counter = 0 |
A simple reference counter, keep track of a number of users.
Definition at line 225 of file BulkAllocator.h.
typedef unsigned int lar::details::bulk_allocator::ReferenceCounter::Counter_t |
type of user counter
Definition at line 227 of file BulkAllocator.h.
|
inline |
Adds a user to the users count.
Definition at line 236 of file BulkAllocator.h.
|
inline |
Returns the number of registered users.
Definition at line 233 of file BulkAllocator.h.
|
inline |
Returns whether there are currently users.
Definition at line 230 of file BulkAllocator.h.
|
inline |
Removed a user to the users count; returns false if no user yet.
Definition at line 239 of file BulkAllocator.h.
|
private |
Definition at line 243 of file BulkAllocator.h.