mFrame
載入中...
搜尋中...
無符合項目
Floats.h
1
7#ifndef MFRAME_D058821B_1E72_462D_A6EC_00EA14E01C9D
8#define MFRAME_D058821B_1E72_462D_A6EC_00EA14E01C9D
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15#include "./../lang/NonInstantiable.h"
16
17//----------------------------------------------------------------------------------------
18
19/* ***************************************************************************************
20 * Namespace
21 */
22namespace ufm::numb {
23 class Floats;
24} // namespace ufm::numb
25
26/* ***************************************************************************************
27 * Class/Interface/Struct/Enum
28 */
29
43 /* *************************************************************************************
44 * Variable
45 */
46
47 /* *************************************************************************************
48 * Abstract Method
49 */
50
51 /* *************************************************************************************
52 * Construct Method
53 */
54 protected:
59 virtual ~Floats(void) override = default;
60
61 /* *************************************************************************************
62 * Operator Method
63 */
64
65 /* *************************************************************************************
66 * Override Method
67 */
68
69 /* *************************************************************************************
70 * Public Method
71 */
72
73 /* *************************************************************************************
74 * Protected Method
75 */
76
77 /* *************************************************************************************
78 * Private Method
79 */
80 private:
90 static bool parseExponent(float& baseValue, const char* str, int& index, int limit);
91
92 /* *************************************************************************************
93 * Static Variable
94 */
95 public:
96 static const int MAX_ASCII_VALUE;
97 static const float MAX_VALUE;
98 static const float MIN_VALUE;
99 /* *************************************************************************************
100 * Static Method
101 */
102 public:
113 static bool isFloat(const char* str, int limit = -1);
114
127 static bool parseFloat(float& result, const char* str, int limit = -1);
128};
129
130/* ***************************************************************************************
131 * End of file
132 */
133
134#endif /* MFRAME_D058821B_1E72_462D_A6EC_00EA14E01C9D */
Definition NonInstantiable.h:29
浮點數靜態工具類
Definition Floats.h:42
static const float MAX_VALUE
浮點數最大值
Definition Floats.h:97
static bool parseFloat(float &result, const char *str, int limit=-1)
將字串解析為 float
virtual ~Floats(void) override=default
Destroy the Floats object.
static const int MAX_ASCII_VALUE
浮點數字串最大長度
Definition Floats.h:96
static const float MIN_VALUE
浮點數最小值
Definition Floats.h:98
static bool isFloat(const char *str, int limit=-1)
判斷字串是否為浮點數格式
Definition Boolean.h:23