mFrame
載入中...
搜尋中...
無符合項目
Shorts.h
1
7#ifndef MFRAME_6B6AAADD_762E_4D84_956A_0B5030792CA6
8#define MFRAME_6B6AAADD_762E_4D84_956A_0B5030792CA6
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15#include "./../lang/NonInstantiable.h"
16
17//----------------------------------------------------------------------------------------
18
19/* ***************************************************************************************
20 * Namespace
21 */
22namespace ufm::numb {
23 class Shorts;
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 ~Shorts(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
81 /* *************************************************************************************
82 * Static Variable
83 */
84
85 /* *************************************************************************************
86 * Static Method
87 */
88 public:
95 static inline uint16 castUnsigned(short value) {
96 return static_cast<uint16>(value);
97 }
98
105 static inline short castSigned(uint16 value) {
106 return static_cast<short>(value);
107 }
108
122 static short valueOf(const char* str);
123};
124
125/* ***************************************************************************************
126 * End of file
127 */
128
129#endif /* MFRAME_6B6AAADD_762E_4D84_956A_0B5030792CA6 */
Definition NonInstantiable.h:29
短整數(short)靜態工具類
Definition Shorts.h:42
static short valueOf(const char *str)
將字串解析並轉換為 short 值
virtual ~Shorts(void) override=default
Destroy the Shorts object.
static uint16 castUnsigned(short value)
轉換有符號 short 為無符號 16 位整數
Definition Shorts.h:95
static short castSigned(uint16 value)
轉換無符號 16 位整數為有符號 short
Definition Shorts.h:105
Definition Boolean.h:23