-
Notifications
You must be signed in to change notification settings - Fork 350
/
Copy pathCObject.h
52 lines (42 loc) · 874 Bytes
/
CObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/***************************
@Author: Chunel
@Contact: [email protected]
@File: CObject.h
@Time: 2021/4/26 8:12 下午
@Desc: 所有类型的父节点,其中run()方法必须实现
***************************/
#ifndef CGRAPH_COBJECT_H
#define CGRAPH_COBJECT_H
#include "CBasicDefine.h"
#include "CValType.h"
#include "CFuncType.h"
CGRAPH_NAMESPACE_BEGIN
class CObject {
public:
/**
* 默认构造函数
*/
explicit CObject() = default;
/**
* 初始化函数
*/
virtual CStatus init() {
CGRAPH_EMPTY_FUNCTION
}
/**
* 流程处理函数
*/
virtual CStatus run() = 0;
/**
* 释放函数
*/
virtual CStatus destroy() {
CGRAPH_EMPTY_FUNCTION
}
/**
* 默认析构函数
*/
virtual ~CObject() = default;
};
CGRAPH_NAMESPACE_END
#endif //CGRAPH_COBJECT_H