MADNESS  version 0.9
Public Member Functions | List of all members
madness::detail::RemoteCounterImpl< T > Class Template Reference

Remote counter implementation object. More...

#include <worldref.h>

Inheritance diagram for madness::detail::RemoteCounterImpl< T >:
Inheritance graph
[legend]
Collaboration diagram for madness::detail::RemoteCounterImpl< T >:
Collaboration graph
[legend]

Public Member Functions

 RemoteCounterImpl (const std::shared_ptr< T > &p)
 
virtual ~RemoteCounterImpl ()
 
const std::shared_ptr< T > & get_shared () const
 Shared pointer accessor. More...
 
virtual void * key () const
 Counter key accessor. More...
 
- Public Member Functions inherited from madness::detail::RemoteCounterBase
 RemoteCounterBase ()
 
virtual ~RemoteCounterBase ()
 
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...
 

Detailed Description

template<typename T>
class madness::detail::RemoteCounterImpl< T >

Remote counter implementation object.

This class stores a shared pointer in memory to ensure that the referenced object is valid as long as there are outstanding remote references.

Template Parameters
TThe type of the referenced shared_ptr object.
Note
This class is considered an implementation detail and may change at any time. You should not use this class directly.

Constructor & Destructor Documentation

template<typename T >
madness::detail::RemoteCounterImpl< T >::RemoteCounterImpl ( const std::shared_ptr< T > &  p)
inlineexplicit
template<typename T >
virtual madness::detail::RemoteCounterImpl< T >::~RemoteCounterImpl ( )
inlinevirtual

Member Function Documentation

template<typename T >
const std::shared_ptr<T>& madness::detail::RemoteCounterImpl< T >::get_shared ( ) const
inline

Shared pointer accessor.

Returns
A const reference to the stored shared pointer
template<typename T >
virtual void* madness::detail::RemoteCounterImpl< T >::key ( ) const
inlinevirtual

Counter key accessor.

The key is the pointer for which the remote counter is counting references.

Returns
The pointer that is being counted.

Implements madness::detail::RemoteCounterBase.

References madness::tr1::shptr::shared_ptr< T >::get().


The documentation for this class was generated from the following file: