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
108 /* *************************************************************************************
109 * Friend
110 */
111 public:
112 friend class ufm::util::Application;
113
114 /* *************************************************************************************
115 * Class/Interface/Struct/Enum
116 */
117 public:
118 enum struct State : uint32;
119
120 /* *************************************************************************************
121 * Variable
122 */
123 protected:
125 const char* vName;
129 float vUsage;
132
133 /* *************************************************************************************
134 * Abstract Method
135 */
136
137 /* *************************************************************************************
138 * Construct Method
139 */
140 public:
145
149 virtual ~ApplicationHandle(void) override;
150
151 /* *************************************************************************************
152 * Operator Method
153 */
154
155 /* *************************************************************************************
156 * Override -
157 */
158
159 /* *************************************************************************************
160 * Public Method
161 */
162 public:
167 inline void setName(const char* name) {
168 this->vName = name;
169 }
170
175 inline const char* getName(void) const {
176 return this->vName;
177 }
178
183 inline float getUsage(void) const {
184 return this->vUsage;
185 }
186
191 inline State getState(void) const {
192 return this->vState;
193 }
194
195 /* *************************************************************************************
196 * Protected Method
197 */
198
199 /* *************************************************************************************
200 * Private Method
201 */
202
203 /* *************************************************************************************
204 * Static Variable
205 */
206
207 /* *************************************************************************************
208 * Static Method
209 */
210};
211
234 NONE,
235 CREATED,
236 INITIALIZED,
237 RUNNING,
238 STOPPING,
239 STOPPED,
240 DESTROYED
241};
242
243/* ***************************************************************************************
244 * End of file
245 */
246
247#endif /* MFRAME_E65E24A9_40BB_4834_8172_4356F4D2312D */
物件基底類別
Definition Object.h:63
應用程式處理器類別,負責管理應用程式的生命週期狀態與資源使用率。
Definition ApplicationHandle.h:107
State vState
目前的生命週期狀態。
Definition ApplicationHandle.h:131
const char * vName
應用程式名稱,用於識別和除錯。
Definition ApplicationHandle.h:125
float getUsage(void) const
取得使用率百分比
Definition ApplicationHandle.h:183
void setName(const char *name)
設定名稱
Definition ApplicationHandle.h:167
State getState(void) const
取得目前狀態
Definition ApplicationHandle.h:191
const char * getName(void) const
取得名稱
Definition ApplicationHandle.h:175
ApplicationHandle(void)
建構 Application Handler 並初始化狀態與使用率。
float vUsage
CPU 使用率,範圍 0.0 到 1.0。
Definition ApplicationHandle.h:129
uint32 vUsageTick
使用量時間計數,用於計算資源使用率。
Definition ApplicationHandle.h:127
virtual ~ApplicationHandle(void) override
解構 Application Handler。
State
應用程式生命週期狀態列舉,定義應用程式在不同階段的狀態。
Definition ApplicationHandle.h:233
應用程式管理器,管理應用程式實例的完整生命週期。
Definition Application.h:107
Definition Iterable.h:28