KaRL  3.0.0
madara::utility::ThreadSafeRefcounter< T >::Shim Struct Reference

A shim class that keeps track of the reference count and a pointer to the type T that's reference counted. More...

Public Member Functions

 Shim (T *t, bool manage=true)
 Constructor. More...
 
 ~Shim (void)
 Destructor. More...
 

Public Attributes

bool manage_
 allow unmanaged references More...
 
MADARA_LOCK_TYPE mutex_
 mutex for updating refcount_ More...
 
volatile int refcount_
 Current value of the reference count. More...
 
T * t_
 Pointer to the object that's being reference counted. More...
 

Detailed Description

template<typename T>
struct madara::utility::ThreadSafeRefcounter< T >::Shim

A shim class that keeps track of the reference count and a pointer to the type T that's reference counted.

Definition at line 86 of file ThreadSafeRefcounter.h.

Constructor & Destructor Documentation

template<typename T>
madara::utility::ThreadSafeRefcounter< T >::Shim::Shim ( T *  t,
bool  manage = true 
)

Constructor.

Definition at line 208 of file ThreadSafeRefcounter.cpp.

template<typename T >
madara::utility::ThreadSafeRefcounter< T >::Shim::~Shim ( void  )

Destructor.

Definition at line 214 of file ThreadSafeRefcounter.cpp.

Member Data Documentation

template<typename T>
bool madara::utility::ThreadSafeRefcounter< T >::Shim::manage_

allow unmanaged references

Definition at line 104 of file ThreadSafeRefcounter.h.

template<typename T>
MADARA_LOCK_TYPE madara::utility::ThreadSafeRefcounter< T >::Shim::mutex_
mutable

mutex for updating refcount_

Definition at line 98 of file ThreadSafeRefcounter.h.

template<typename T>
volatile int madara::utility::ThreadSafeRefcounter< T >::Shim::refcount_

Current value of the reference count.

Definition at line 101 of file ThreadSafeRefcounter.h.

template<typename T>
T* madara::utility::ThreadSafeRefcounter< T >::Shim::t_

Pointer to the object that's being reference counted.

Definition at line 95 of file ThreadSafeRefcounter.h.


The documentation for this struct was generated from the following files: