QBEInteger Class
template <typename T> class QBEIntegerQBEInteger クラスは、プラットフォームに依存しないビッグエンディアン整数を提供します。詳細...
ヘッダ | #include <QBEInteger> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
パブリック関数
QBEInteger(T value) | |
T | operator T() const |
bool | operator!=(QBEInteger<T> other) const |
QBEInteger<T> & | operator%=(T i) |
QBEInteger<T> & | operator&=(T i) |
QBEInteger<T> & | operator*=(T i) |
QBEInteger<T> & | operator++() |
QBEInteger<T> | operator++(int) |
QBEInteger<T> & | operator+=(T i) |
QBEInteger<T> & | operator--() |
QBEInteger<T> | operator--(int) |
QBEInteger<T> & | operator-=(T i) |
QBEInteger<T> & | operator/=(T i) |
QBEInteger<T> & | operator<<=(T i) |
QBEInteger<T> & | operator=(T i) |
bool | operator==(QBEInteger<T> other) const |
QBEInteger<T> & | operator>>=(T i) |
QBEInteger<T> & | operator^=(T i) |
QBEInteger<T> & | operator|=(T i) |
静的パブリックメンバー
詳細説明
テンプレート・パラメータT
は C++ 整数型でなければなりません:
- 8 ビット: char、符号付き char、符号なし char、qint8、quint8
- 16 ビット: short、unsigned short、qint16、quint16、char16_t
- 32ビット: int, unsigned int, qint32, quint32, char32_t
- 64ビット: long long、unsigned long long、qint64、quint64
- プラットフォーム固有サイズ: long, unsigned long
- ポインタ・サイズ: qintptr, quintptr, qptrdiff
注意: このクラスを使うとネイティブ整数を使うより遅くなるかもしれないので、正確なエンディアンが必要なときだけ使ってください。
メンバ関数ドキュメント
[explicit constexpr]
QBEInteger::QBEInteger(T value)
与えられたvalue で QBEInteger を構築します。
[static constexpr]
QBEInteger<T> QBEInteger::max()
T関数は、数値型Tで表現可能な(有限の)最大値を返します。
[static constexpr]
QBEInteger<T> QBEInteger::min()
T関数は、数値型Tで表現可能な最小(有限)値を返します。
T QBEInteger::operator T() const
このQBEInteger の値をネイティブの整数として返します。
bool QBEInteger::operator!=(QBEInteger<T> other) const
QBEInteger の値がother の値と等しくない場合、true
を返す。
QBEInteger<T> &QBEInteger::operator%=(T i)
このQBEInteger をi による除算の余りに設定し、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator&=(T i)
QBEInteger にi とのビットごとの AND を実行し、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator*=(T i)
i にこのQBEInteger を掛け合わせ、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator++()
このQBEInteger に対してプレフィックス++
(インクリメント)を実行し、このオブジェクトへの参照を返します。
QBEInteger<T> QBEInteger::operator++(int)
このQBEInteger に対して postfix++
(increment) を実行し、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator+=(T i)
このQBEInteger にi を追加し、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator--()
このQBEInteger に対してプレフィックス--
(デクリメント)を行い、このオブジェクトへの参照を返す。
QBEInteger<T> QBEInteger::operator--(int)
このQBEInteger に対して postfix--
(decrement) を実行し、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator-=(T i)
このQBEInteger からi を引き、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator/=(T i)
このQBEInteger をi で分割し、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator<<=(T i)
このQBEInteger に対してi による右シフトを行い、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator=(T i)
i をこのQBEInteger に割り当て、このQBEInteger への参照を返す。
bool QBEInteger::operator==(QBEInteger<T> other) const
QBEInteger の値がother の値と等しい場合、true
を返す。
QBEInteger<T> &QBEInteger::operator>>=(T i)
i QBEInteger で左シフトを行い、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator^=(T i)
QBEInteger にi とのビットごとの XOR を行い、このオブジェクトへの参照を返す。
QBEInteger<T> &QBEInteger::operator|=(T i)
QBEInteger にi とのビット OR を行い、このオブジェクトへの参照を返す。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.