SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions
SGReferencedData Class Reference

Detailed Description

shogun reference count managed data

Definition at line 21 of file SGReferencedData.h.

Inheritance diagram for SGReferencedData:
Inheritance graph
[legend]

Public Member Functions

 SGReferencedData (bool ref_counting=true)
 SGReferencedData (const SGReferencedData &orig)
SGReferencedDataoperator= (const SGReferencedData &orig)
virtual ~SGReferencedData ()
int32_t ref_count ()

Protected Member Functions

void copy_refcount (const SGReferencedData &orig)
int32_t ref ()
int32_t unref ()
virtual void copy_data (const SGReferencedData &orig)=0
virtual void init_data ()=0
virtual void free_data ()=0

Constructor & Destructor Documentation

SGReferencedData ( bool  ref_counting = true)

default constructor

Definition at line 8 of file SGReferencedData.cpp.

copy constructor

Definition at line 18 of file SGReferencedData.cpp.

~SGReferencedData ( )
virtual

empty destructor

NOTE: unref() has to be called in derived classes to avoid memory leaks.

Definition at line 36 of file SGReferencedData.cpp.

Member Function Documentation

virtual void copy_data ( const SGReferencedData orig)
protectedpure virtual
void copy_refcount ( const SGReferencedData orig)
protected

copy refcount

Definition at line 55 of file SGReferencedData.cpp.

virtual void free_data ( )
protectedpure virtual
virtual void init_data ( )
protectedpure virtual
SGReferencedData & operator= ( const SGReferencedData orig)

override assignment operator to increase refcount on assignments

Definition at line 24 of file SGReferencedData.cpp.

int32_t ref ( )
protected

increase reference counter

Returns
reference count

Definition at line 64 of file SGReferencedData.cpp.

int32_t ref_count ( )

display reference counter

Returns
reference count

Definition at line 41 of file SGReferencedData.cpp.

int32_t unref ( )
protected

decrement reference counter and deallocate object if refcount is zero before or after decrementing it

Returns
reference count

Definition at line 84 of file SGReferencedData.cpp.


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

SHOGUN Machine Learning Toolbox - Documentation