soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SRunnable-i.h
1#ifndef __SRUNNABLE_I__H__
2#define __SRUNNABLE_I__H__
3#include <interface/obj-ref-i.h>
4
5SNSBEGIN
6
7#undef INTERFACE
8#define INTERFACE IRunnable
9DECLARE_INTERFACE_(IRunnable, IObjRef)
10{
11 /**
12 * @brief 增加引用计数
13 * @return 新引用计数
14 */
15 STDMETHOD_(long, AddRef)(THIS) PURE;
16
17 /**
18 * @brief 减少引用计数
19 * @return 新引用计数
20 */
21 STDMETHOD_(long, Release)(THIS) PURE;
22
23 /**
24 * @brief 释放对象
25 * @return void
26 */
27 STDMETHOD_(void, OnFinalRelease)(THIS) PURE;
28
29 /**
30 * @brief clone当前对象
31 * @return IRunnable *--clone得到的新对象
32 */
33 STDMETHOD_(IRunnable *, clone)(CTHIS) SCONST PURE;
34
35 /**
36 * @brief 运行该对象
37 * @return
38 */
39 STDMETHOD_(void, run)(THIS) PURE;
40
41 /**
42 * @brief 获取该Runnable的宿主
43 * @return void *--宿主指针,对于FreeFunction对象,该值为NULL
44 */
45 STDMETHOD_(void *, getObject)(THIS) PURE;
46
47 /**
48 * @brief 获取runnable的描述
49 * @return const char *--描述
50 */
51 STDMETHOD_(const char *, getClassInfo)(CTHIS) SCONST PURE;
52};
53
54SNSEND
55#endif // __SRUNNABLE_I__H__
Interface for reference counting.
Definition obj-ref-i.h:19