mFrame
載入中...
搜尋中...
無符合項目
ApplicationHandle.h
1
7#ifndef MFRAME_E65E24A9_40BB_4834_8172_4356F4D2312D
8#define MFRAME_E65E24A9_40BB_4834_8172_4356F4D2312D
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15#include "../lang/Object.h"
16
17//----------------------------------------------------------------------------------------
18
19/* ***************************************************************************************
20 * Namespace
21 */
22namespace ufm::util {
23 class ApplicationHandle;
24 class Application;
25} // namespace ufm::util
26
27/* ***************************************************************************************
28 * Class/Interface/Struct/Enum
29 */
30
41 /* *************************************************************************************
42 * Friend
43 */
44 public:
45 friend class ufm::util::Application;
46
47 /* *************************************************************************************
48 * Class/Interface/Struct/Enum
49 */
50 public:
51 enum struct State : uint32;
52
53 /* *************************************************************************************
54 * Variable
55 */
56 protected:
57 const char* vName;
58 uint32 vUsageTick;
59 float vUsage;
60 State vState;
61
62 /* *************************************************************************************
63 * Abstract Method
64 */
65
66 /* *************************************************************************************
67 * Construct Method
68 */
69 public:
74
78 virtual ~ApplicationHandle(void) override;
79
80 /* *************************************************************************************
81 * Operator Method
82 */
83
84 /* *************************************************************************************
85 * Override -
86 */
87
88 /* *************************************************************************************
89 * Public Method
90 */
91 public:
96 inline void setName(const char* name) {
97 this->vName = name;
98 }
99
104 inline const char* getName(void) const {
105 return this->vName;
106 }
107
112 inline float getUsage(void) const {
113 return this->vUsage;
114 }
115
120 inline State getState(void) const {
121 return this->vState;
122 }
123
124 /* *************************************************************************************
125 * Protected Method
126 */
127
128 /* *************************************************************************************
129 * Private Method
130 */
131
132 /* *************************************************************************************
133 * Static Variable
134 */
135
136 /* *************************************************************************************
137 * Static Method
138 */
139};
140
148 NONE,
149 CREATED,
150 INITIALIZED,
151 RUNNING,
152 STOPPING,
153 STOPPED,
154 DESTROYED
155};
156
157/* ***************************************************************************************
158 * End of file
159 */
160
161#endif /* MFRAME_E65E24A9_40BB_4834_8172_4356F4D2312D */
物件基底類別
Definition Object.h:63
Application Handler 類別,負責管理應用程式的生命週期狀態與資源使用率。
Definition ApplicationHandle.h:40
float getUsage(void) const
取得使用率百分比
Definition ApplicationHandle.h:112
void setName(const char *name)
設定名稱
Definition ApplicationHandle.h:96
State getState(void) const
取得目前狀態
Definition ApplicationHandle.h:120
const char * getName(void) const
取得名稱
Definition ApplicationHandle.h:104
ApplicationHandle(void)
建構 Application Handler 並初始化狀態與使用率。
virtual ~ApplicationHandle(void) override
解構 Application Handler。
State
應用程式生命週期狀態 定義各階段狀態。
Definition ApplicationHandle.h:147
應用程式管理器 管理所有應用程式實例的生命週期,包括創建、初始化、執行、停止、銷毀。 以 PArraySet 儲存並管理。
Definition Application.h:42
Definition Iterable.h:28