shogun reference count managed data
在文件 SGReferencedData.h 第 21 行定义.
Public 成员函数 | |
SGReferencedData (bool ref_counting=true) | |
SGReferencedData (const SGReferencedData &orig) | |
SGReferencedData & | operator= (const SGReferencedData &orig) |
virtual | ~SGReferencedData () |
int32_t | ref_count () |
Protected 成员函数 | |
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 |
SGReferencedData | ( | bool | ref_counting = true | ) |
default constructor
在文件 SGReferencedData.cpp 第 8 行定义.
SGReferencedData | ( | const SGReferencedData & | orig | ) |
copy constructor
在文件 SGReferencedData.cpp 第 18 行定义.
|
virtual |
empty destructor
NOTE: unref() has to be called in derived classes to avoid memory leaks.
在文件 SGReferencedData.cpp 第 36 行定义.
|
protectedpure virtual |
needs to be overridden to copy data
在 SGVector< T >, SGVector< uint32_t >, SGVector< float64_t >, SGVector< float32_t >, SGVector< int32_t >, SGVector< complex128_t >, SGVector< char >, SGVector< index_t >, SGVector< bool >, SGVector< uint64_t >, SGMatrix< T >, SGMatrix< uint32_t >, SGMatrix< double >, SGMatrix< ST >, SGMatrix< float64_t >, SGMatrix< int >, SGMatrix< float32_t >, SGMatrix< int32_t >, SGMatrix< uint16_t >, SGMatrix< index_t >, SGMatrix< bool >, SGSparseMatrix< T >, SGSparseVector< T >, SGSparseMatrix< ST >, SGSparseMatrix< float64_t >, SGSparseVector< ST >, SGSparseVector< float64_t >, SGNDArray< T >, SGNDArray< float64_t >, SGMatrixList< T >, SGMatrixList< float64_t >, SGMatrixList< ST > , 以及 SGStringList< T > 内被实现.
|
protected |
copy refcount
在文件 SGReferencedData.cpp 第 55 行定义.
|
protectedpure virtual |
needs to be overridden to free data
在 SGVector< T >, SGVector< uint32_t >, SGVector< float64_t >, SGVector< float32_t >, SGVector< int32_t >, SGVector< complex128_t >, SGVector< char >, SGVector< index_t >, SGVector< bool >, SGVector< uint64_t >, SGMatrix< T >, SGMatrix< uint32_t >, SGMatrix< double >, SGMatrix< ST >, SGMatrix< float64_t >, SGMatrix< int >, SGMatrix< float32_t >, SGMatrix< int32_t >, SGMatrix< uint16_t >, SGMatrix< index_t >, SGMatrix< bool >, SGSparseMatrix< T >, SGSparseMatrix< ST >, SGSparseMatrix< float64_t >, SGSparseVector< T >, SGSparseVector< ST >, SGSparseVector< float64_t >, SGNDArray< T >, SGNDArray< float64_t >, SGMatrixList< T >, SGMatrixList< float64_t >, SGMatrixList< ST > , 以及 SGStringList< T > 内被实现.
|
protectedpure virtual |
needs to be overridden to initialize empty data
在 SGVector< T >, SGVector< uint32_t >, SGVector< float64_t >, SGVector< float32_t >, SGVector< int32_t >, SGVector< complex128_t >, SGVector< char >, SGVector< index_t >, SGVector< bool >, SGVector< uint64_t >, SGMatrix< T >, SGMatrix< uint32_t >, SGMatrix< double >, SGMatrix< ST >, SGMatrix< float64_t >, SGMatrix< int >, SGMatrix< float32_t >, SGMatrix< int32_t >, SGMatrix< uint16_t >, SGMatrix< index_t >, SGMatrix< bool >, SGSparseMatrix< T >, SGSparseMatrix< ST >, SGSparseMatrix< float64_t >, SGSparseVector< T >, SGSparseVector< ST >, SGSparseVector< float64_t >, SGNDArray< T >, SGNDArray< float64_t >, SGMatrixList< T >, SGMatrixList< float64_t >, SGMatrixList< ST > , 以及 SGStringList< T > 内被实现.
SGReferencedData & operator= | ( | const SGReferencedData & | orig | ) |
override assignment operator to increase refcount on assignments
在文件 SGReferencedData.cpp 第 24 行定义.
|
protected |
int32_t ref_count | ( | ) |
|
protected |
decrement reference counter and deallocate object if refcount is zero before or after decrementing it
在文件 SGReferencedData.cpp 第 84 行定义.