mFrame
載入中...
搜尋中...
無符合項目
SimpleInputStream.h
1
8#ifndef MFRAME_F2C68ECA_A0F0_4BB0_B2BD_4CCD7F780D66
9#define MFRAME_F2C68ECA_A0F0_4BB0_B2BD_4CCD7F780D66
10
11/* ***************************************************************************************
12 * Include
13 */
14
15//----------------------------------------------------------------------------------------
16
17//----------------------------------------------------------------------------------------
18#include "./../func/Runnable.h"
19#include "./../io/InputStream.h"
20#include "./../lang/Object.h"
21
22/* ***************************************************************************************
23 * Namespace
24 */
25namespace ufm::io {
26 class SimpleInputStream;
27} // namespace ufm::io
28
29/* ***************************************************************************************
30 * Class/Interface/Struct/Enum
31 */
32
42 public ufm::func::Runnable {
43 /* *************************************************************************************
44 * Variable
45 */
46 private:
48
49 void* vAttachment;
50
51 protected:
52 int vResult;
54
55 /* *************************************************************************************
56 * Abstract Method
57 */
58
59 /* *************************************************************************************
60 * Construct Method
61 */
62 public:
69
73 virtual ~SimpleInputStream(void) override;
74
75 /* *************************************************************************************
76 * Operator Method
77 */
78
79 /* *************************************************************************************
80 * Override Method - ufm::io::InputStream
81 */
82 public:
89 virtual bool abortRead(void) override;
90
97 virtual bool readBusy(void) override;
98
110 virtual bool read(ufm::lang::Appendable& appendable,
111 void* attachment,
112 ufm::io::CompletionHandler<int>* handler) override;
113
114 /* *************************************************************************************
115 * Override Method - ufm::func::Runnable
116 */
117 public:
123 virtual void run(void) override;
124 /* *************************************************************************************
125 * Public Method
126 */
127
128 /* *************************************************************************************
129 * Protected Method
130 */
131
132 /* *************************************************************************************
133 * Private Method
134 */
135
136 /* *************************************************************************************
137 * Static Variable
138 */
139
140 /* *************************************************************************************
141 * Static Method
142 */
143};
144
145/* ***************************************************************************************
146 * End of file
147 */
148
149#endif /* MFRAME_F2C68ECA_A0F0_4BB0_B2BD_4CCD7F780D66 */
簡易輸入串流實現,支援非同步讀取操作
Definition SimpleInputStream.h:42
ufm::lang::Appendable * vAppendable
資料接收目標
Definition SimpleInputStream.h:53
virtual bool read(ufm::lang::Appendable &appendable, void *attachment, ufm::io::CompletionHandler< int > *handler) override
非同步讀取資料到指定的可附加物件
virtual bool readBusy(void) override
檢查當前是否有讀取操作進行中
int vResult
讀取操作結果
Definition SimpleInputStream.h:52
virtual void run(void) override
執行讀取操作的實際處理邏輯
SimpleInputStream(void)
建立一個簡易輸入串流
virtual bool abortRead(void) override
中止當前進行中的讀取操作
virtual ~SimpleInputStream(void) override
釋放資源並終止任何進行中的操作
物件基底類別
Definition Object.h:63
Definition Buffer.h:24
[Interface] 可執行函數式介面
Definition Runnable.h:40
[Interface] 非同步操作完成事件處理器模板介面
Definition CompletionHandler.h:42
[Interface] 定義了輸入流的基本操作
Definition InputStream.h:37
資料附加介面 (Appendable)
Definition Appendable.h:43