mFrame
載入中...
搜尋中...
無符合項目
ufm::numb::Byte 類別 參考文件final

位元組封裝類 更多...

#include <Byte.h>

類別ufm::numb::Byte的繼承圖:
ufm::numb::Number ufm::lang::Object ufm::lang::Interface

公開方法(Public Methods)

 Byte (void)
 建構 Byte 物件
 
 Byte (char value)
 建構 Byte 物件
 
 operator char (void)
 轉型為位元組
 
bool operator== (char v)
 比較Byte物件與位元組是否相等
 
bool operator== (Byte &v)
 比較兩個Byte物件是否相等
 
char operator= (char v)
 指定運算子
 
Byte operator+= (int v)
 加法指定運算子
 
Byte operator-= (int v)
 減法指定運算子
 
Byte operator*= (int v)
 乘法指定運算子
 
Byte operator/= (int v)
 除法指定運算子
 
Byte operator++ (int)
 後置遞增運算子
 
Byte operator++ ()
 前置遞增運算子
 
Byte operator-- (int)
 後置遞減運算子
 
Byteoperator-- (void)
 前置遞減運算子
 
- 公開方法(Public Methods) 繼承自 ufm::numb::Number
 Number (void)
 建構 Number 物件
 
 operator bool & (void)
 轉型為 bool 引用
 
 operator const bool & (void) const
 轉型為 const bool 引用
 
 operator int & (void)
 轉型為 int 引用
 
 operator const int & (void) const
 轉型為 const int 引用
 
 operator uint32 & (void)
 轉型為 uint32 引用
 
 operator const uint32 & (void) const
 轉型為 const uint32 引用
 
 operator float & (void)
 轉型為 float 引用
 
 operator const float & (void) const
 轉型為 const float 引用
 
 operator double & (void)
 轉型為 double 引用
 
 operator const double & (void) const
 轉型為 const double 引用
 
bool operator== (Number &v)
 比較兩個 Number 物件是否相等
 
virtual int hashcode (void) const override
 返回對象的哈希碼值
 
- 公開方法(Public Methods) 繼承自 ufm::lang::Object
void * operator new (size_t n)
 使用運算子 new 分配記憶體
 
void * operator new (size_t n, void *p)
 在指定記憶體上調用運算子 new
 
virtual ufm::lang::ObjectgetObject (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::ThreadcurrentThread (void) const
 取得當前執行緒指標
 
- 公開方法(Public Methods) 繼承自 ufm::lang::Interface
virtual ~Interface (void)=default
 虛擬析構函式
 

額外的繼承成員

- 保護屬性 繼承自 ufm::numb::Number
Value vValue
 數值儲存體
 

詳細描述

位元組封裝類

此類封裝char原始類型,提供物件導向方式操作位元組。 繼承自Number基礎類,實現了各種運算子重載,使得位元組可以像物件一樣使用。 主要功能包括:

  • 位元組的儲存與操作
  • 支持各種數學運算(加減乘除)
  • 提供與其他數值類型的比較操作
  • 實現前置後置遞增遞減運算子

建構子與解構子說明文件

◆ Byte() [1/2]

ufm::numb::Byte::Byte ( void )

建構 Byte 物件

預設建構函式,初始化為預設值的 Byte 物件

◆ Byte() [2/2]

ufm::numb::Byte::Byte ( char value)

建構 Byte 物件

參數
value初始化值

使用指定的位元組值建構 Byte 物件

函式成員說明文件

◆ operator char()

ufm::numb::Byte::operator char ( void )
inline

轉型為位元組

傳回值
char 物件的位元組值

◆ operator*=()

Byte ufm::numb::Byte::operator*= ( int v)
inline

乘法指定運算子

參數
v要乘的整數值
傳回值
Byte 運算後的結果

◆ operator++() [1/2]

Byte ufm::numb::Byte::operator++ ( )
inline

前置遞增運算子

傳回值
Byte 遞增後的值

◆ operator++() [2/2]

Byte ufm::numb::Byte::operator++ ( int )
inline

後置遞增運算子

傳回值
Byte 遞增前的值

◆ operator+=()

Byte ufm::numb::Byte::operator+= ( int v)
inline

加法指定運算子

參數
v要加的整數值
傳回值
Byte 運算後的結果

◆ operator--() [1/2]

Byte ufm::numb::Byte::operator-- ( int )
inline

後置遞減運算子

傳回值
Byte 遞減前的值

◆ operator--() [2/2]

Byte & ufm::numb::Byte::operator-- ( void )
inline

前置遞減運算子

傳回值
Byte& 遞減後的引用

◆ operator-=()

Byte ufm::numb::Byte::operator-= ( int v)
inline

減法指定運算子

參數
v要減的整數值
傳回值
Byte 運算後的結果

◆ operator/=()

Byte ufm::numb::Byte::operator/= ( int v)
inline

除法指定運算子

參數
v要除的整數值
傳回值
Byte 運算後的結果

◆ operator=()

char ufm::numb::Byte::operator= ( char v)
inline

指定運算子

參數
v位元組來源值
傳回值
char 指定後的值

◆ operator==() [1/2]

bool ufm::numb::Byte::operator== ( Byte & v)
inline

比較兩個Byte物件是否相等

參數
v要比較的Byte物件
傳回值
true 相等
false 不相等

◆ operator==() [2/2]

bool ufm::numb::Byte::operator== ( char v)
inline

比較Byte物件與位元組是否相等

參數
v要比較的位元組值
傳回值
true 相等
false 不相等

此類別(class) 文件是由下列檔案中產生: