mFrame
載入中...
搜尋中...
無符合項目
StringFormat.h
1
8#ifndef MFRAME_5F596881_5E43_4F42_97D0_4B6E1F7ED311
9#define MFRAME_5F596881_5E43_4F42_97D0_4B6E1F7ED311
10
11/* ***************************************************************************************
12 * Include
13 */
14
15//----------------------------------------------------------------------------------------
16#include "./../lang/Appendable.h"
17#include "./../lang/Memory.h"
18#include "./../lang/NonInstantiable.h"
19
20//----------------------------------------------------------------------------------------
21
22/* ***************************************************************************************
23 * Namespace
24 */
25namespace ufm::lang {
26 class StringFormat;
27} // namespace ufm::lang
28
29/* ***************************************************************************************
30 * Class/Interface/Struct/Enum
31 */
32
37 /* *************************************************************************************
38 * Variable
39 */
40
41 /* *************************************************************************************
42 * Abstract Method
43 */
44
45 /* *************************************************************************************
46 * Construct Method
47 */
48 protected:
54 virtual ~StringFormat(void) override = default;
55
56 /* *************************************************************************************
57 * Operator Method
58 */
59
60 /* *************************************************************************************
61 * Operator Method
62 */
63
64 /* *************************************************************************************
65 * Override Method
66 */
67
68 /* *************************************************************************************
69 * Public Method
70 */
71
72 /* *************************************************************************************
73 * Protected Method
74 */
75
76 /* *************************************************************************************
77 * Private Method
78 */
79
80 /* *************************************************************************************
81 * Static Variable
82 */
83 private:
84 static char vFormatBuffer[];
85
86 /* *************************************************************************************
87 * Static Method
88 */
89 public:
101 static int pointerVa(void* buffer, size_t bufferSize, const char* format, va_list args);
102
113 static int memoryVa(const ufm::lang::Memory& memory, const char* format, va_list args);
114
125 static int writeBufferVa(ufm::lang::Appendable& appendable,
126 const char* format,
127 va_list args);
128
140 static int pointer(void* buffer, uint32 bufferSize, const char* format, ...);
141
152 static int memory(const ufm::lang::Memory& memory, const char* format, ...);
153
164 static int writeBuffer(ufm::lang::Appendable& appendable, const char* format, ...);
165
176 static int scanVa(const char* src, const char* format, va_list args);
177
188 static int scan(const char* src, const char* format, ...);
189
198 static int size(const char* src);
199
209 static bool isEmpty(const char* src);
210};
211
212/* ***************************************************************************************
213 * End of file
214 */
215
216#endif /* MFRAME_5F596881_5E43_4F42_97D0_4B6E1F7ED311 */
存儲資料的類別,提供動態記憶體管理功能。
Definition Memory.h:44
Definition NonInstantiable.h:29
字串格式化類別,提供格式化輸入與輸出的相關方法
Definition StringFormat.h:36
virtual ~StringFormat(void) override=default
禁止實例化 StringFormat 類別
static int pointer(void *buffer, uint32 bufferSize, const char *format,...)
使用格式化字串和可變參數寫入緩衝區
static int pointerVa(void *buffer, size_t bufferSize, const char *format, va_list args)
使用 va_list 參數格式化字串到緩衝區
static int writeBufferVa(ufm::lang::Appendable &appendable, const char *format, va_list args)
使用 va_list 參數格式化字串並寫入 Appendable
static int scan(const char *src, const char *format,...)
使用可變參數從字串中掃描資料
static int size(const char *src)
計算 C 字串長度
static bool isEmpty(const char *src)
檢查字串是否為空
static int scanVa(const char *src, const char *format, va_list args)
使用 va_list 參數從字串中掃描資料
static int writeBuffer(ufm::lang::Appendable &appendable, const char *format,...)
使用格式化字串和可變參數寫入 Appendable
static int memory(const ufm::lang::Memory &memory, const char *format,...)
使用格式化字串和可變參數寫入 Memory
static int memoryVa(const ufm::lang::Memory &memory, const char *format, va_list args)
使用 va_list 參數格式化字串到 Memory 物件
Definition Appendable.h:23
資料附加介面 (Appendable)
Definition Appendable.h:43