Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::RefCnt< T > Class Template Reference

Base class for reference countable objects. More...

#include <refcnt.h>

Inheritance diagram for roc::core::RefCnt< T >:
Collaboration diagram for roc::core::RefCnt< T >:

Public Member Functions

long getref () const
 Get reference counter. More...
 
void incref () const
 Increment reference counter. More...
 
void decref () const
 Decrement reference counter. More...
 

Detailed Description

template<class T>
class roc::core::RefCnt< T >

Base class for reference countable objects.

Template Parameters
Tdefines the derived class, which should provide free() method.

Definition at line 25 of file refcnt.h.

Member Function Documentation

template<class T>
void roc::core::RefCnt< T >::decref ( ) const
inline

Decrement reference counter.

Remarks
Calls free() if reference counter becomes zero.

Definition at line 54 of file refcnt.h.

template<class T>
long roc::core::RefCnt< T >::getref ( ) const
inline

Get reference counter.

Definition at line 39 of file refcnt.h.

template<class T>
void roc::core::RefCnt< T >::incref ( ) const
inline

Increment reference counter.

Definition at line 44 of file refcnt.h.


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