SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ( int32_t  ref_start = 0)

Constructor

Parameters
ref_startstarting value for counter

Definition at line 23 of file RefCount.h.

Member Function Documentation

int32_t ref ( )

Increase ref count

Returns
the new reference count

Definition at line 5 of file RefCount.cpp.

int32_t ref_count ( )

Get the reference count

Returns
the reference count

Definition at line 31 of file RefCount.cpp.

int32_t unref ( )

Decrease reference count

Returns
the new reference count

Definition at line 18 of file RefCount.cpp.

Member Data Documentation

CLock lock

the lock

Definition at line 50 of file RefCount.h.

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