SHOGUN  v3.2.0
List of all members | Public Member Functions | Public Attributes
RefCount Class Reference

Detailed Description

brief This class implements a thread-safe counter used for reference counting.

Definition at line 16 of file RefCount.h.

Public Member Functions

 RefCount (int32_t ref_start=0)
 
int32_t ref ()
 
int32_t unref ()
 
int32_t ref_count ()
 

Public Attributes

int32_t rc
 
CLock lock
 

Constructor & Destructor Documentation

◆ RefCount()

RefCount ( int32_t  ref_start = 0)

Constructor

Parameters
ref_startstarting value for counter

Definition at line 23 of file RefCount.h.

Member Function Documentation

◆ ref()

int32_t ref ( )

Increase ref count

Returns
the new reference count

Definition at line 5 of file RefCount.cpp.

◆ ref_count()

int32_t ref_count ( )

Get the reference count

Returns
the reference count

Definition at line 31 of file RefCount.cpp.

◆ unref()

int32_t unref ( )

Decrease reference count

Returns
the new reference count

Definition at line 18 of file RefCount.cpp.

Member Data Documentation

◆ lock

CLock lock

the lock

Definition at line 50 of file RefCount.h.

◆ rc

int32_t rc

reference count

Definition at line 47 of file RefCount.h.


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

SHOGUN Machine Learning Toolbox - Documentation