mFrame
載入中...
搜尋中...
無符合項目
Svcexec.h
1
7#ifndef MFRAME_AC4CB7C6_B782_4E3C_8253_82699F70AF97
8#define MFRAME_AC4CB7C6_B782_4E3C_8253_82699F70AF97
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15#include "./../func/Runnable.h"
16#include "./../lang/Object.h"
17#include "./../util/Queue.h"
18
19//----------------------------------------------------------------------------------------
20
21/* ***************************************************************************************
22 * Namespace
23 */
24namespace ufm::sys {
25 class Svcexec;
26} // namespace ufm::sys
27
28/* ***************************************************************************************
29 * Class/Interface/Struct/Enum
30 */
32 /* *************************************************************************************
33 * Variable
34 */
35 private:
37
38 /* *************************************************************************************
39 * Abstract Method
40 */
41
42 /* *************************************************************************************
43 * Construct Method
44 */
45 public:
54
59 virtual ~Svcexec(void) override;
60
61 /* *************************************************************************************
62 * Operator Method
63 */
64
65 /* *************************************************************************************
66 * Override - ufm::func::Runnable
67 */
68 public:
69 virtual void run(void) override;
70
71 /* *************************************************************************************
72 * Public Method
73 */
74 public:
84 inline bool execute(ufm::func::Runnable& task) {
85 return this->vQueue.offer(&task);
86 }
87
88 /* *************************************************************************************
89 * Protected Method
90 */
91
92 /* *************************************************************************************
93 * Private Method
94 */
95
96 /* *************************************************************************************
97 * Static Variable
98 */
99
100 /* *************************************************************************************
101 * Static Method
102 */
103};
104
105/* ***************************************************************************************
106 * End of file
107 */
108
109#endif /* MFRAME_AC4CB7C6_B782_4E3C_8253_82699F70AF97 */
物件基底類別
Definition Object.h:63
Definition Svcexec.h:31
bool execute(ufm::func::Runnable &task)
在服務主機中執行使用者事件
Definition Svcexec.h:84
virtual ~Svcexec(void) override
Destroy the object.
Svcexec(ufm::util::Queue< ufm::func::Runnable * > &queue)
Construct a new Svcexec object.
virtual void run(void) override
執行方法
系統功能相關的命名空間
Definition Object.h:31
[Interface] 可執行函數式介面
Definition Runnable.h:40
[Interface] 佇列介面
Definition Queue.h:44
virtual bool offer(E const &element) override
如果在不違反容量限制的情況下立即執行,則將指定的元素插入到此隊列中。 當使用容量限制隊列時,此方法通常優於 add(E) ,這可能無法僅通過拋出異常來插入元素。