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