|
TNB Library
|
多倍長整数管理 [詳解]
#include <TnbLongInteger.h>
CLongIntegerT< PLACE > の継承関係図公開メンバ関数 | |
| bool | CanExpressInt (void) const |
| [確認] 保持値確認. [詳解] | |
| bool | CanExpressLonglong (void) const |
| [確認] 保持値確認. [詳解] | |
| CLongIntegerT (const CLongIntegerT &other) | |
| コピーコンストラクタ. [詳解] | |
| CLongIntegerT (LONGLONG val) | |
| 代入コンストラクタ. [詳解] | |
| CLongIntegerT (void) | |
| コンストラクタ. [詳解] | |
| virtual INT_PTR | Compare (const CLongIntegerT< PLACE > &t) const |
| [確認] 比較 [詳解] | |
| virtual INT_PTR | Compare (const TNB::CLongIntegerT< 8 > &t) const=0 |
| [確認] 比較 [詳解] | |
| virtual void | Deserialize (const IDeserializer &ds) |
| [処理] デシリアライズ [詳解] | |
| bool | Divide (CLongIntegerT &_quotient, CLongIntegerT &_remainder, const CLongIntegerT &val) const |
| [計算] 除算. [詳解] | |
| bool | GetBit (INDEX bitNo) const |
| [取得] ビット取得. [詳解] | |
| void | GetRawData (CWorkMem &_rawData) const |
| [取得] 生データ取得. [詳解] | |
| size_t | GetValidBitsCount (void) const |
| [取得] 有効 bit 数取得. [詳解] | |
| virtual bool | IsEqual (const TNB::CLongIntegerT< 8 > &t) const |
| [確認] 比較 [詳解] | |
| bool | IsMinus (void) const |
| [確認] マイナス確認. [詳解] | |
| bool | IsZero (void) const |
| [確認] ゼロ確認. [詳解] | |
| bool | operator!= (const TNB::CLongIntegerT< 8 > &t) const |
| [確認] 比較 [詳解] | |
| CLongIntegerT & | operator%= (const CLongIntegerT &val) |
| [代入] 余り算代入. [詳解] | |
| CLongIntegerT & | operator&= (const CLongIntegerT &val) |
| [代入] AND 算代入. [詳解] | |
| CLongIntegerT & | operator*= (const CLongIntegerT &val) |
| [代入] 乗算代入. [詳解] | |
| CLongIntegerT | operator+ (void) const |
| [計算] プラス符号. [詳解] | |
| CLongIntegerT | operator++ (int) |
| [代入] インクリメント. [詳解] | |
| CLongIntegerT & | operator++ (void) |
| [代入] インクリメント. [詳解] | |
| CLongIntegerT & | operator+= (const CLongIntegerT &val) |
| [代入] 加算代入. [詳解] | |
| INT_PTR | operator- (const TNB::CLongIntegerT< 8 > &t) const |
| [確認] 比較 [詳解] | |
| CLongIntegerT | operator- (void) const |
| [計算] マイナス符号. [詳解] | |
| CLongIntegerT | operator-- (int) |
| [代入] デクリメント. [詳解] | |
| CLongIntegerT & | operator-- (void) |
| [代入] デクリメント. [詳解] | |
| CLongIntegerT & | operator-= (const CLongIntegerT &val) |
| [代入] 減算代入. [詳解] | |
| CLongIntegerT & | operator/= (const CLongIntegerT &val) |
| [代入] 除算代入. [詳解] | |
| bool | operator< (const TNB::CLongIntegerT< 8 > &t) const |
| [確認] 比較 [詳解] | |
| CLongIntegerT | operator<< (size_t val) const |
| [計算] 左シフト. [詳解] | |
| CLongIntegerT & | operator<<= (size_t val) |
| [代入] 左シフト代入. [詳解] | |
| bool | operator<= (const TNB::CLongIntegerT< 8 > &t) const |
| [確認] 比較 [詳解] | |
| CLongIntegerT & | operator= (const CLongIntegerT &other) |
| コピーオペレータ. [詳解] | |
| CLongIntegerT & | operator= (LONGLONG val) |
| 代入オペレータ. [詳解] | |
| bool | operator== (const TNB::CLongIntegerT< 8 > &t) const |
| [確認] 比較 [詳解] | |
| bool | operator> (const TNB::CLongIntegerT< 8 > &t) const |
| [確認] 比較 [詳解] | |
| bool | operator>= (const TNB::CLongIntegerT< 8 > &t) const |
| [確認] 比較 [詳解] | |
| CLongIntegerT | operator>> (size_t val) const |
| [計算] 右シフト. [詳解] | |
| CLongIntegerT & | operator>>= (size_t val) |
| [代入] 右シフト代入. [詳解] | |
| CLongIntegerT & | operator^= (const CLongIntegerT &val) |
| [代入] XOR 算代入. [詳解] | |
| CLongIntegerT & | operator|= (const CLongIntegerT &val) |
| [代入] OR 算代入. [詳解] | |
| CLongIntegerT | operator~ (void) const |
| [計算] ビット反転. [詳解] | |
| const BYTE * | RefRawData (void) const |
| [参照] 生データ参照. [詳解] | |
| virtual void | Serialize (ISerializer &_sr) const |
| [処理] シリアライズ [詳解] | |
| void | SetBit (INDEX bitNo, bool v=true) |
| [設定] ビット設定. [詳解] | |
| size_t | SetHexString (LPCTSTR lpsz) |
| [代入] 値代入. [詳解] | |
| void | SetRawData (size_t size, LPCVOID lpRawData) |
| [設定] 生データ設定. [詳解] | |
| size_t | SetString (LPCTSTR lpsz) |
| [代入] 値代入. [詳解] | |
| CStr | ToHexString (bool isUpperCase=true) const |
| [取得] HEX文字列化. [詳解] | |
| int | ToInt (void) const |
| [取得] int 取得. [詳解] | |
| LONGLONG | ToLonglong (void) const |
| [取得] LONGLONG 取得. [詳解] | |
| CStr | ToString (void) const |
| [取得] 文字列化. [詳解] | |
| void | Zero (void) |
| [代入] ゼロ代入. [詳解] | |
静的公開メンバ関数 | |
| static CLongIntegerT | FromHexString (LPCTSTR lpsz) |
| [取得] 変換値取得. [詳解] | |
| static CLongIntegerT | FromString (LPCTSTR lpsz) |
| [取得] 変換値取得. [詳解] | |
| static size_t | GetBitsCount (void) |
| [取得] bit 数取得. [詳解] | |
| static size_t | GetBytesCount (void) |
| [取得] byte 数取得. [詳解] | |
| static CLongIntegerT | GetMax (void) |
| [取得] 最大値取得. [詳解] | |
| static size_t | GetMaxPlace (void) |
| [取得] 最大桁数取得. [詳解] | |
| static CLongIntegerT | GetMin (void) |
| [取得] 最小値取得. [詳解] | |
多倍長整数管理
64bit 以上の整数を扱うことが出来ます。
| PLACE | 桁数。2以上を指定できます。 PLACE x 32 bit までの値を扱えます。 |
TnbLongInteger.h の 42 行目に定義があります。
| CLongIntegerT | ( | void | ) |
| CLongIntegerT | ( | const CLongIntegerT< PLACE > & | other | ) |
| CLongIntegerT | ( | LONGLONG | val | ) |
| bool CanExpressInt | ( | void | ) | const |
| bool CanExpressLonglong | ( | void | ) | const |
[確認] 保持値確認.
保持している値が LONGLONG で表現可能か、確認をします。
| true | 表現可能。 |
| false | 不可能。 |
TnbLongInteger.h の 909 行目に定義があります。
|
virtual |
|
pure virtualinherited |
[確認] 比較
| t | 比較対象 |
| 0 | 自分は t と同じ |
| 1以上 | 自分は t より大きい |
| 0未満 | 自分は t より小さい |
|
virtual |
[処理] デシリアライズ
| ds | デシリアライザー。これからメンバの内容を取り出してください。 |
| CTnbException | 失敗時は、任意のスローの可能性があります。 |
ISerializableを実装しています。
TnbLongInteger.h の 1021 行目に定義があります。
| bool Divide | ( | CLongIntegerT< PLACE > & | _quotient, |
| CLongIntegerT< PLACE > & | _remainder, | ||
| const CLongIntegerT< PLACE > & | val | ||
| ) | const |
[計算] 除算.
保持している値を指定の除算値で割り、結果を返します。
| [out] | _quotient | 計算結果の商。 |
| [out] | _remainder | 計算結果の余り。 |
| [in] | val | 除算値. |
| true | 成功. |
| false | 失敗(0割エラー). |
TnbLongInteger.h の 816 行目に定義があります。
|
static |
[取得] 変換値取得.
HEX文字列から値を作成します。
| lpsz | 文字列. |
TnbLongInteger.h の 1122 行目に定義があります。
|
static |
[取得] 変換値取得.
文字列から値を作成します。
| lpsz | 文字列. |
TnbLongInteger.h の 1103 行目に定義があります。
| bool GetBit | ( | INDEX | bitNo | ) | const |
[取得] ビット取得.
| bitNo | ビットNo。 0〜 GetBitsCount() 未満を指定できます。 |
| true | 指定ビットは1。 |
| false | 指定ビットは0。 |
TnbLongInteger.h の 245 行目に定義があります。
|
static |
|
static |
|
static |
|
static |
[取得] 最大桁数取得.
10進数で表せる桁数を返します。 例えば、 4 なら 9999 〜 -9999 は表すことが出来ます。
TnbLongInteger.h の 1059 行目に定義があります。
|
static |
| void GetRawData | ( | CWorkMem & | _rawData | ) | const |
[取得] 生データ取得.
管理している数値をBYTEの配列として取得します。
| [out] | _rawData | 生データが格納されます。 |
TnbLongInteger.h の 217 行目に定義があります。
| size_t GetValidBitsCount | ( | void | ) | const |
[取得] 有効 bit 数取得.
TnbLongInteger.h の 935 行目に定義があります。
|
virtualinherited |
| bool IsMinus | ( | void | ) | const |
| bool IsZero | ( | void | ) | const |
|
inherited |
| CLongIntegerT & operator%= | ( | const CLongIntegerT< PLACE > & | val | ) |
| CLongIntegerT & operator&= | ( | const CLongIntegerT< PLACE > & | val | ) |
| CLongIntegerT & operator*= | ( | const CLongIntegerT< PLACE > & | val | ) |
| CLongIntegerT operator+ | ( | void | ) | const |
| CLongIntegerT operator++ | ( | int | ) |
| CLongIntegerT & operator++ | ( | void | ) |
| CLongIntegerT & operator+= | ( | const CLongIntegerT< PLACE > & | val | ) |
|
inherited |
| CLongIntegerT operator- | ( | void | ) | const |
| CLongIntegerT operator-- | ( | int | ) |
| CLongIntegerT & operator-- | ( | void | ) |
| CLongIntegerT & operator-= | ( | const CLongIntegerT< PLACE > & | val | ) |
| CLongIntegerT & operator/= | ( | const CLongIntegerT< PLACE > & | val | ) |
|
inherited |
| CLongIntegerT operator<< | ( | size_t | val | ) | const |
| CLongIntegerT & operator<<= | ( | size_t | val | ) |
|
inherited |
| CLongIntegerT & operator= | ( | const CLongIntegerT< PLACE > & | other | ) |
| CLongIntegerT & operator= | ( | LONGLONG | val | ) |
|
inherited |
|
inherited |
|
inherited |
| CLongIntegerT operator>> | ( | size_t | val | ) | const |
| CLongIntegerT & operator>>= | ( | size_t | val | ) |
| CLongIntegerT & operator^= | ( | const CLongIntegerT< PLACE > & | val | ) |
| CLongIntegerT & operator|= | ( | const CLongIntegerT< PLACE > & | val | ) |
| CLongIntegerT operator~ | ( | void | ) | const |
| const BYTE * RefRawData | ( | void | ) | const |
[参照] 生データ参照.
管理している数値をBYTEの配列として参照します。
TnbLongInteger.h の 234 行目に定義があります。
|
virtual |
[処理] シリアライズ
| [out] | _sr | シリアライザー。 |
| CTnbException | 失敗時は、任意のスローの可能性があります。 |
ISerializableを実装しています。
TnbLongInteger.h の 1006 行目に定義があります。
| void SetBit | ( | INDEX | bitNo, |
| bool | v = true |
||
| ) |
| size_t SetHexString | ( | LPCTSTR | lpsz | ) |
[代入] 値代入.
HEX文字列で、値を代入します。
| lpsz | 文字列. |
TnbLongInteger.h の 161 行目に定義があります。
| void SetRawData | ( | size_t | size, |
| LPCVOID | lpRawData | ||
| ) |
[設定] 生データ設定.
BYTEの配列を数値として設定します。
| size | 生データサイズ. |
| lpRawData | 生データ. |
TnbLongInteger.h の 196 行目に定義があります。
| size_t SetString | ( | LPCTSTR | lpsz | ) |
[代入] 値代入.
文字列で、値を代入します。
| lpsz | 文字列. |
TnbLongInteger.h の 99 行目に定義があります。
| CStr ToHexString | ( | bool | isUpperCase = true | ) | const |
[取得] HEX文字列化.
保持している値を HEX 文字列化します。
| isUpperCase | false を指定すると小文字、 省略 か true を指定すると大文字で作成します。 |
TnbLongInteger.h の 959 行目に定義があります。
| int ToInt | ( | void | ) | const |
[取得] int 取得.
TnbLongInteger.h の 898 行目に定義があります。
| LONGLONG ToLonglong | ( | void | ) | const |
[取得] LONGLONG 取得.
TnbLongInteger.h の 923 行目に定義があります。
| CStr ToString | ( | void | ) | const |
| void Zero | ( | void | ) |