mFrame
載入中...
搜尋中...
無符合項目
Scanner.h
1
7#ifndef MFRAME_0D9BA3BA_2E87_41FB_A948_02CAC4832E3B
8#define MFRAME_0D9BA3BA_2E87_41FB_A948_02CAC4832E3B
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15
16//----------------------------------------------------------------------------------------
17#include "./../io/ByteBuffer.h"
18
19/* ***************************************************************************************
20 * Namespace
21 */
22namespace mframe::util {
23 class Scanner;
24}
25
26/* ***************************************************************************************
27 * Class/Interface/Struct/Enum
28 */
30 /* *************************************************************************************
31 * Variable
32 */
33 private:
35 int vIndex;
36
37 /* *************************************************************************************
38 * Abstract Method
39 */
40
41 /* *************************************************************************************
42 * Construct Method
43 */
44 public:
52
59 Scanner(int bufferSize = 128);
60
65 virtual ~Scanner(void) override;
66
67 /* *************************************************************************************
68 * Operator Method
69 */
70
71 /* *************************************************************************************
72 * Public Method <Override>
73 */
74
75 /* *************************************************************************************
76 * Public Method
77 */
78 public:
98 int hasNext(int limit = 0);
99
109 bool hasNextChar(char ch);
110
120 bool hasNextBoolean(void);
121
136 bool hasNextInteger(int limit = 0);
137
151 bool hasNextFloat(int limit = 0);
152
167 int hasNextLine(int limit = 0);
168
183 bool nextBoolean(bool& result);
184
203 int nextLine(mframe::lang::Appendable& appendable, int limit = 0);
204
224 bool nextInteger(int& result, int limit = 0);
225
246 bool nextFloat(float& result, int limit = 0);
247
257 bool nextChar(char& result);
258
284 int next(mframe::lang::Appendable& appendable, int limit = 0);
285
307 int skip(char pattern, int limit = 0);
308
324 int skipNext(int limit = 0);
325
340 int skipNextLine(int limit = 0);
341
349 /* *************************************************************************************
350 * Protected Method
351 */
352
353 /* *************************************************************************************
354 * Private Method
355 */
356
357 /* *************************************************************************************
358 * Static Variable
359 */
360
361 /* *************************************************************************************
362 * Static Method
363 */
364};
365
366/* ***************************************************************************************
367 * End of file
368 */
369
370#endif /* MFRAME_0D9BA3BA_2E87_41FB_A948_02CAC4832E3B */
Definition ByteBuffer.h:35
Definition Memory.h:29
Definition Object.h:34
Definition Scanner.h:29
int skipNextLine(int limit=0)
跳躍當前行至下一行。
bool hasNextFloat(int limit=0)
取出緩衝區是否滿足一個浮點數。
int skip(char pattern, int limit=0)
跳躍直到發現指定字元。
int skipNext(int limit=0)
跳躍當前字幅串。
bool nextInteger(int &result, int limit=0)
取出下一個整數。
bool nextChar(char &result)
取出下一個字元。
bool nextBoolean(bool &result)
取出下一個布林值。
int insert(mframe::lang::Readable &readable)
插入新的資料至緩衝區;
int next(mframe::lang::Appendable &appendable, int limit=0)
取出下一個字幅串。
bool hasNextInteger(int limit=0)
取出緩衝區是否滿足一個整數。
int hasNextLine(int limit=0)
取出緩衝區是否滿足一行。
bool hasNextChar(char ch)
取出緩衝區是否擁有指定的字元。
Scanner(const mframe::lang::Memory &buffer)
Construct a new Scanner object.
bool nextFloat(float &result, int limit=0)
取出下一個浮點數。
Scanner(int bufferSize=128)
Construct a new Scanner object.
int nextLine(mframe::lang::Appendable &appendable, int limit=0)
取出下一行。
bool hasNextBoolean(void)
取出緩衝區是否滿足一個布林值。
int hasNext(int limit=0)
取出緩衝區是否擁有字元。
virtual ~Scanner(void) override
Destroy the object.
Definition Array.h:22
可附加的 <Interface>
Definition Appendable.h:36
Definition Readable.h:31