QBEInteger Class
template <typename T> class QBEIntegerA classe QBEInteger fornece inteiros no formato big-endian independentes de plataforma. Saiba mais...
| Cabeçalho: | #include <QBEInteger> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
Funções públicas
| 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) |
Membros públicos estáticos
Descrição detalhada
QBEInteger<T> armazena um valor inteiro na ordem de bytes big-endian, em que T especifica o tipo inteiro C++ subjacente. O parâmetro de modelo T deve ser um tipo inteiro C++:
- 8 bits: char, signed char, unsigned char, qint8, quint8
- 16 bits: short, unsigned short, qint16, quint16, char16_t
- 32 bits: int, unsigned int, qint32, quint32, char32_t
- 64 bits: long long, unsigned long long, qint64, quint64
- tamanho específico da plataforma: long, unsigned long
- tamanho do ponteiro: qintptr, quintptr, qptrdiff
Observação: o uso desta classe pode ser mais lento do que o uso de inteiros nativos; portanto, utilize-a somente quando for necessária uma endianidade exata.
Documentação das funções de membro
[explicit constexpr] QBEInteger::QBEInteger(T value)
Cria um objeto QBEInteger com o valor fornecido em ` value`.
[static constexpr] QBEInteger<T> QBEInteger::max()
Retorna o valor máximo (finito) que pode ser representado pelo tipo numérico T.
[static constexpr] QBEInteger<T> QBEInteger::min()
Retorna o valor mínimo (finito) representável pelo tipo numérico T.
QBEInteger::operator T() const
Retorna o valor deste ` QBEInteger ` como um inteiro nativo.
bool QBEInteger::operator!=(QBEInteger<T> other) const
Retorna ` true ` se o valor deste ` QBEInteger ` não for igual ao valor de ` other`.
QBEInteger<T> &QBEInteger::operator%=(T i)
Define este objeto ` QBEInteger ` como o resto da divisão de ` i ` e retorna uma referência a esse objeto.
QBEInteger<T> &QBEInteger::operator&=(T i)
Realiza uma operação AND bit a bit com i sobre este QBEInteger e retorna uma referência a este objeto.
QBEInteger<T> &QBEInteger::operator*=(T i)
Multiplica ` i ` por este ` QBEInteger ` e retorna uma referência a este objeto.
QBEInteger<T> &QBEInteger::operator++()
Executa um ++ o de prefixo (incremento) neste QBEInteger e retorna uma referência a este objeto.
QBEInteger<T> QBEInteger::operator++(int)
Executa um ++ o pós-fixo (incremento) neste QBEInteger e retorna uma referência a este objeto.
QBEInteger<T> &QBEInteger::operator+=(T i)
Adiciona ` i ` a este ` QBEInteger ` e retorna uma referência a este objeto.
QBEInteger<T> &QBEInteger::operator--()
Executa uma operação de prefixo “ -- ” (decremento) neste objeto ` QBEInteger ` e retorna uma referência a este objeto.
QBEInteger<T> QBEInteger::operator--(int)
Executa uma operação de decremento ( -- ) pós-infix neste objeto ` QBEInteger ` e retorna uma referência a esse objeto.
QBEInteger<T> &QBEInteger::operator-=(T i)
Subtrai ` i ` deste ` QBEInteger ` e retorna uma referência a este objeto.
QBEInteger<T> &QBEInteger::operator/=(T i)
Divide este QBEInteger por i e retorna uma referência a este objeto.
QBEInteger<T> &QBEInteger::operator<<=(T i)
Realiza um deslocamento à direita por i neste QBEInteger e retorna uma referência a esse objeto.
QBEInteger<T> &QBEInteger::operator=(T i)
Atribui ` i ` a este ` QBEInteger ` e retorna uma referência a este ` QBEInteger`.
bool QBEInteger::operator==(QBEInteger<T> other) const
Retorna ` true ` se o valor deste ` QBEInteger ` for igual ao valor de ` other`.
QBEInteger<T> &QBEInteger::operator>>=(T i)
Realiza um deslocamento à esquerda de i neste QBEInteger e retorna uma referência a este objeto.
QBEInteger<T> &QBEInteger::operator^=(T i)
Realiza uma operação XOR bit a bit com i sobre este QBEInteger e retorna uma referência a este objeto.
QBEInteger<T> &QBEInteger::operator|=(T i)
Realiza uma operação OR bit a bit com i neste QBEInteger e retorna uma referência a este objeto.
© 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.