mFrame
載入中...
搜尋中...
無符合項目
PrintBuffer.h
1
7#ifndef MFRAME_0105D590_C0D6_4307_AB0E_0988007EEC05
8#define MFRAME_0105D590_C0D6_4307_AB0E_0988007EEC05
9
10/* ***************************************************************************************
11 * Include
12 */
13
14#include <stdarg.h>
15//----------------------------------------------------------------------------------------
16
17//----------------------------------------------------------------------------------------
18#include "./../io/RingBuffer.h"
19#include "./../lang/Memory.h"
20#include "./../lang/Strings.h"
21
22/* ***************************************************************************************
23 * Namespace
24 */
25namespace mframe::io {
26 class PrintBuffer;
27} // namespace mframe::io
28
29/* ***************************************************************************************
30 * Class/Interface/Struct/Enum
31 */
33 /* *************************************************************************************
34 * Variable
35 */
36
37 /* *************************************************************************************
38 * Abstract Method
39 */
40
41 /* *************************************************************************************
42 * Construct Method
43 */
44 public:
51
58
63 virtual ~PrintBuffer(void) override;
64
65 /* *************************************************************************************
66 * Operator Method
67 */
68 public:
75 inline PrintBuffer& operator<<(bool b) {
76 return this->print(b);
77 }
78
85 inline PrintBuffer& operator<<(char c) {
86 return this->print(c);
87 }
88
95 inline PrintBuffer& operator<<(int i) {
96 return this->print(i);
97 }
98
105 inline PrintBuffer& operator<<(float f) {
106 return this->print(f);
107 }
108
115 inline PrintBuffer& operator<<(double d) {
116 return this->print(d);
117 }
118
125 inline PrintBuffer& operator<<(const char* str) {
126 return this->print(str);
127 }
128
136 return this->print(str);
137 }
138
146 return this->print(r);
147 }
148
149 public:
156 inline PrintBuffer& print(bool b) {
157 return this->print(b, false);
158 }
159
166 inline PrintBuffer& print(char c) {
167 return this->print(c, false);
168 }
169
176 inline PrintBuffer& print(double d) {
177 return this->print(d, false);
178 }
179
186 inline PrintBuffer& print(float f) {
187 return this->print(f, false);
188 }
189
196 inline PrintBuffer& print(int i) {
197 return this->print(i, false, false);
198 }
199
206 inline PrintBuffer& print(uint32 i) {
207 return this->print(static_cast<int>(i), false, true);
208 }
209
216 inline PrintBuffer& print(const mframe::lang::Strings& string) {
217 return this->print(string, false);
218 }
219
226 inline PrintBuffer& print(const char* string) {
227 return this->print(string, false);
228 }
229
237 return this->print(readBuffer, false);
238 }
239
246 inline PrintBuffer& println(bool b) {
247 return this->print(b, true);
248 }
249
256 inline PrintBuffer& println(char c) {
257 return this->print(c, true);
258 }
259
266 inline PrintBuffer& println(double d) {
267 return this->print(d, true);
268 }
269
276 inline PrintBuffer& println(float f) {
277 return this->print(f, true);
278 }
279
286 inline PrintBuffer& println(int i) {
287 return this->print(i, true, false);
288 }
289
296 inline PrintBuffer& println(uint32 i) {
297 return this->print(static_cast<int>(i), true, true);
298 }
299
307 return this->print(string, true);
308 }
309
316 inline PrintBuffer& println(const char* string) {
317 return this->print(string, true);
318 }
319
327 return this->print(readBuffer, true);
328 }
329
330 /* *************************************************************************************
331 * Public Method
332 */
333 public:
341 PrintBuffer& print(bool b, bool newLine);
342
350 PrintBuffer& print(char c, bool newLine);
351
359 PrintBuffer& print(double d, bool newLine);
360
368 PrintBuffer& print(float f, bool newLine);
369
378 PrintBuffer& print(int i, bool newLine, bool unsign);
379
387 PrintBuffer& print(const mframe::lang::Strings& string, bool newLine);
388
396 PrintBuffer& print(const char* string, bool newLine);
397
405 PrintBuffer& print(mframe::lang::Readable& readBuffer, bool newLine);
406
413
421 PrintBuffer& format(const char* format, ...);
422
423 /* *************************************************************************************
424 * Protected Method
425 */
426
427 /* *************************************************************************************
428 * Private Method
429 */
430
431 /* *************************************************************************************
432 * Static Variable
433 */
434
435 /* *************************************************************************************
436 * Static Method
437 */
438};
439
440/* ***************************************************************************************
441 * End of file
442 */
443
444#endif /* MFRAME_0105D590_C0D6_4307_AB0E_0988007EEC05 */
Definition PrintBuffer.h:32
PrintBuffer & print(const char *string, bool newLine)
PrintBuffer & operator<<(mframe::lang::Strings &str)
Definition PrintBuffer.h:135
PrintBuffer & println(float f)
Definition PrintBuffer.h:276
PrintBuffer & println(const char *string)
Definition PrintBuffer.h:316
PrintBuffer & print(mframe::lang::Readable &readBuffer)
Definition PrintBuffer.h:236
PrintBuffer & print(float f, bool newLine)
PrintBuffer & operator<<(const char *str)
Definition PrintBuffer.h:125
PrintBuffer & println(bool b)
Definition PrintBuffer.h:246
PrintBuffer(const mframe::lang::Memory &memory)
Construct a new Ring Buffer object.
PrintBuffer & print(bool b, bool newLine)
PrintBuffer & print(mframe::lang::Readable &readBuffer, bool newLine)
PrintBuffer & operator<<(char c)
Definition PrintBuffer.h:85
PrintBuffer & print(double d)
Definition PrintBuffer.h:176
PrintBuffer & print(uint32 i)
Definition PrintBuffer.h:206
PrintBuffer & operator<<(mframe::lang::Readable &r)
Definition PrintBuffer.h:145
PrintBuffer & format(const char *format,...)
PrintBuffer & print(int i, bool newLine, bool unsign)
PrintBuffer & println(double d)
Definition PrintBuffer.h:266
PrintBuffer & print(char c, bool newLine)
PrintBuffer & print(const char *string)
Definition PrintBuffer.h:226
PrintBuffer & operator<<(double d)
Definition PrintBuffer.h:115
PrintBuffer & print(int i)
Definition PrintBuffer.h:196
PrintBuffer & operator<<(int i)
Definition PrintBuffer.h:95
PrintBuffer & println(char c)
Definition PrintBuffer.h:256
PrintBuffer & println(uint32 i)
Definition PrintBuffer.h:296
PrintBuffer & print(float f)
Definition PrintBuffer.h:186
PrintBuffer & print(const mframe::lang::Strings &string, bool newLine)
PrintBuffer & println(mframe::lang::Readable &readBuffer)
Definition PrintBuffer.h:326
PrintBuffer & operator<<(bool b)
Definition PrintBuffer.h:75
PrintBuffer & print(char c)
Definition PrintBuffer.h:166
PrintBuffer & println(int i)
Definition PrintBuffer.h:286
PrintBuffer(int length)
Construct a new Ring Buffer object.
virtual ~PrintBuffer(void) override
Destroy the Print Stream object.
PrintBuffer & operator<<(float f)
Definition PrintBuffer.h:105
PrintBuffer & println(const mframe::lang::Strings &string)
Definition PrintBuffer.h:306
PrintBuffer & println(void)
PrintBuffer & print(bool b)
Definition PrintBuffer.h:156
PrintBuffer & print(double d, bool newLine)
PrintBuffer & print(const mframe::lang::Strings &string)
Definition PrintBuffer.h:216
Definition RingBuffer.h:38
int length(void) const
Definition Data.h:126
Definition Memory.h:29
Definition Strings.h:29
Definition AppendableOutputStream.h:24
Definition Readable.h:31