![]() |
mFrame
|
短整數(short)靜態工具類 更多...
#include <Shorts.h>
靜態公開方法(Static Public Methods) | |
static uint16 | castUnsigned (short value) |
轉換有符號 short 為無符號 16 位整數 | |
static short | castSigned (uint16 value) |
轉換無符號 16 位整數為有符號 short | |
static short | valueOf (const char *str) |
將字串解析並轉換為 short 值 | |
保護方法(Protected Methods) | |
virtual | ~Shorts (void) override=default |
Destroy the Shorts object. | |
![]() | |
NonInstantiable (void)=delete | |
禁止實例化 NonInstantiable 類別 | |
NonInstantiable (const NonInstantiable &)=delete | |
禁止複製建構函式 | |
virtual | ~NonInstantiable (void) override=default |
Destroy the Non Instantiable object. | |
NonInstantiable & | operator= (const NonInstantiable &)=delete |
NonInstantiable & | operator= (NonInstantiable &&)=delete |
額外的繼承成員 | |
![]() | |
void * | operator new (size_t n) |
使用運算子 new 分配記憶體 | |
void * | operator new (size_t n, void *p) |
在指定記憶體上調用運算子 new | |
virtual ufm::lang::Object & | getObject (void) override |
取得對應的 Object 物件 | |
void | delay (int milliseconds) const |
延遲指定的毫秒數進行執行緒等待 | |
bool | equals (Object *object) const |
判斷與另一物件是否為相同參照(指標型態比較) | |
bool | equals (Object &object) const |
判斷與另一物件是否為相同參照(參照型態比較) | |
void | wait (void) const |
使當前線程等待直到被通知 | |
bool | wait (int timeout) const |
等待通知或超時 | |
bool | yield (void) const |
讓執行緒讓渡控制權給同優先權的下一個執行緒 | |
int | lock (void) const |
核心鎖定,鎖定期間禁止線程切換 | |
int | unlock (void) const |
核心解鎖 | |
ufm::sys::Thread * | currentThread (void) const |
取得當前執行緒指標 | |
virtual int | hashcode (void) const |
返回對象的哈希碼值。支持這種方法是為了散列表,如HashMap提供的那樣。 | |
![]() | |
virtual | ~Interface (void)=default |
虛擬析構函式 | |
短整數(short)靜態工具類
提供 short 類型的靜態方法,包括:
使用說明:
|
inlinestatic |
轉換無符號 16 位整數為有符號 short
value | 無符號 16 位整數 |
|
inlinestatic |
轉換有符號 short 為無符號 16 位整數
value | 有符號 short 值 |
|
static |
將字串解析並轉換為 short 值
支援格式:
str | 字串來源,必須為有效字元序列,且非 nullptr |
std::invalid_argument | 若字串格式不合法 |
std::out_of_range | 若值超出 short 範圍 |