SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
lib
SGReferencedData.h
浏览该文件的文档.
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 3 of the License, or
5
* (at your option) any later version.
6
*
7
* Copyright (C) 2012 Soeren Sonnenburg
8
*/
9
#ifndef __SGREFERENCED_DATA_H__
10
#define __SGREFERENCED_DATA_H__
11
12
#include <
shogun/lib/common.h
>
13
14
namespace
shogun
15
{
16
class
RefCount;
17
19
class
SGReferencedData
20
{
21
public
:
23
SGReferencedData
(
bool
ref_counting=
true
);
24
26
SGReferencedData
(
const
SGReferencedData
&orig);
27
29
SGReferencedData
&
operator=
(
const
SGReferencedData
&orig);
30
36
virtual
~SGReferencedData
();
37
42
int32_t
ref_count
();
43
44
protected
:
46
void
copy_refcount
(
const
SGReferencedData
&orig);
47
52
int32_t
ref
();
53
59
int32_t
unref
();
60
62
virtual
void
copy_data
(
const
SGReferencedData
&orig)=0;
63
65
virtual
void
init_data
()=0;
66
68
virtual
void
free_data
()=0;
69
70
private
:
71
73
RefCount
* m_refcount;
74
};
75
}
76
#endif // __SGREFERENCED_DATA_H__
SHOGUN
机器学习工具包 - 项目文档