このページでは

QBEInteger Class

template <typename T> class QBEInteger

QBEInteger クラスは、プラットフォームに依存しないビッグエンディアンの整数を提供します。詳細...

ヘッダー: #include <QBEInteger>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core

パブリック関数

QBEInteger(T value)
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)

静的パブリックメンバー

QBEInteger<T> max()
QBEInteger<T> min()

詳細な説明

QBEInteger<T> は、ビッグエンディアンのバイト順で整数値を格納します。ここで、T は基になる C++ 整数型を指定します。テンプレートパラメータT は、C++ 整数型でなければなりません:

  • 8 ビット:char、signed char、unsigned 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 で表現可能な(有限の)最大値を返します。

[static constexpr] QBEInteger<T> QBEInteger::min()

数値型 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 ` に対して後置の `++ `(インクリメント)を実行し、このオブジェクトへの参照を返します。

QBEInteger<T> &QBEInteger::operator+=(T i)

このQBEInteger にi を追加し、このオブジェクトへの参照を返します。

QBEInteger<T> &QBEInteger::operator--()

このQBEInteger に対して接頭辞-- (デクリメント)を実行し、このオブジェクトへの参照を返します。

QBEInteger<T> QBEInteger::operator--(int)

このQBEInteger に対して後置の-- (減算)を実行し、このオブジェクトへの参照を返します。

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)

この `QBEInteger ` に対して、i 分の左シフトを行い、このオブジェクトへの参照を返します。

QBEInteger<T> &QBEInteger::operator^=(T i)

この `QBEInteger ` に対して、i とのビット単位のXOR演算を実行し、このオブジェクトへの参照を返します。

QBEInteger<T> &QBEInteger::operator|=(T i)

この `QBEInteger ` に対して、i とのビット単位の OR 演算を行い、このオブジェクトへの参照を返します。

© 2026 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.