2 #ifndef _MADARA_UTILITY_SCOPED_ARRAY_H_
3 #define _MADARA_UTILITY_SCOPED_ARRAY_H_
54 const T*
get(
void)
const;
This template class provides transparent reference counting of its template parameter T.
Shim * ptr_
Pointer to the Shim.
void increment(void)
implementation of the increment operation
void operator=(T *ptr)
assignment operator for times when you don't want the reference increased for incoming ptr
T * get_ptr(void)
get the underlying pointer
T * get(void)
get the underlying pointer
virtual ~ScopedArray(void)
Dtor will delete pointer if refcount becomes 0.
void decrement(void)
implementation of the decrement operation
ScopedArray(void)
default Ctor
Provides utility functions and classes for common tasks and needs.
Copyright(c) 2020 Galois.
A shim class that keeps track of the reference count and a pointer to the type T that's reference cou...
int refcount_
Current value of the reference count.
T * t_
Pointer to the object that's being reference counted.