MADNESS
version 0.9
|
Base class for remote counter implementation objects. More...
#include <worldref.h>
Public Member Functions | |
RemoteCounterBase () | |
virtual | ~RemoteCounterBase () |
virtual void * | key () const =0 |
Counter key accessor. More... | |
long | use_count () const |
Remote and local counter accessor. More... | |
template<typename T > | |
const std::shared_ptr< T > & | get_shared () const |
Shared pointer accessor. More... | |
void | add_ref () |
Increment the reference count. More... | |
bool | release () |
Decrement the reference count. More... | |
Base class for remote counter implementation objects.
This class only holds an atomic counter. The use counter tracks local copies of the counter an references that have been copied as part of the communication process. This class also provides a mechanism for hiding the pointer type.
|
inline |
|
inlinevirtual |
|
inline |
Increment the reference count.
The reference count should be incremented when a local copy of the counter is created or the when the counter is serialized as part of communication.
nothing |
References c, key(), and madness::print().
|
inline |
Shared pointer accessor.
T | The stored pointer type |
|
pure virtual |
Counter key accessor.
The key is the pointer for which the remote counter is counting references.
Implemented in madness::detail::RemoteCounterImpl< T >.
|
inline |
Decrement the reference count.
nothing |
References c, madness::AtomicInt::dec_and_test(), key(), and madness::print().
|
inline |
Remote and local counter accessor.
The use counter tracks local copies of the counter an references that have been copied as part othe communication process