QLEInteger Class
template <typename T> class QLEIntegerA classe QLEInteger fornece inteiros no formato little-endian independentes de plataforma. Mais...
| Cabeçalho: | #include <QLEInteger> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
Funções públicas
| QLEInteger(T value) | |
| operator T() const | |
| bool | operator!=(QLEInteger<T> other) const |
| QLEInteger<T> & | operator%=(T i) |
| QLEInteger<T> & | operator&=(T i) |
| QLEInteger<T> & | operator*=(T i) |
| QLEInteger<T> & | operator++() |
| QLEInteger<T> | operator++(int) |
| QLEInteger<T> & | operator+=(T i) |
| QLEInteger<T> & | operator--() |
| QLEInteger<T> | operator--(int) |
| QLEInteger<T> & | operator-=(T i) |
| QLEInteger<T> & | operator/=(T i) |
| QLEInteger<T> & | operator<<=(T i) |
| QLEInteger<T> & | operator=(T i) |
| bool | operator==(QLEInteger<T> other) const |
| QLEInteger<T> & | operator>>=(T i) |
| QLEInteger<T> & | operator^=(T i) |
| QLEInteger<T> & | operator|=(T i) |
Membros públicos estáticos
Descrição detalhada
QLEInteger<T> armazena um valor inteiro na ordem de bytes little-endian, em que T especifica o tipo inteiro subjacente do C++. O parâmetro de modelo T deve ser um tipo inteiro do 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 apenas quando for necessária uma endianidade exata.
Documentação das funções-membro
[explicit constexpr] QLEInteger::QLEInteger(T value)
Cria um objeto `QLEInteger` com o ` value` fornecido.
[static constexpr] QLEInteger<T> QLEInteger::max()
Retorna o valor máximo (finito) representável pelo tipo numérico T.
[static constexpr] QLEInteger<T> QLEInteger::min()
Retorna o valor mínimo (finito) representável pelo tipo numérico T.
QLEInteger::operator T() const
Retorna o valor deste objeto ` QLEInteger ` como um inteiro nativo.
bool QLEInteger::operator!=(QLEInteger<T> other) const
Retorna ` true ` se o valor de ` QLEInteger ` não for igual ao valor de ` other`.
QLEInteger<T> &QLEInteger::operator%=(T i)
Define este objeto ` QLEInteger ` como o resto da divisão de ` i ` e retorna uma referência a esse objeto.
QLEInteger<T> &QLEInteger::operator&=(T i)
Realiza uma operação AND bit a bit com i sobre este QLEInteger e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator*=(T i)
Multiplica ` i ` por este ` QLEInteger ` e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator++()
Executa um ++ o de prefixo (incremento) neste QLEInteger e retorna uma referência a este objeto.
QLEInteger<T> QLEInteger::operator++(int)
Executa um ++ o pós-fixo (incremento) neste QLEInteger e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator+=(T i)
Adiciona ` i ` a este ` QLEInteger ` e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator--()
Executa uma operação de prefixo “ -- ” (decremento) neste objeto “ QLEInteger ” e retorna uma referência a esse objeto.
QLEInteger<T> QLEInteger::operator--(int)
Executa um -- (decremento) pós-fixado neste QLEInteger e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator-=(T i)
Subtrai ` i ` deste ` QLEInteger ` e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator/=(T i)
Divide este QLEInteger pelo i e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator<<=(T i)
Realiza um deslocamento à direita de i neste QLEInteger e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator=(T i)
Atribui i a este QLEInteger e retorna uma referência a este QLEInteger.
bool QLEInteger::operator==(QLEInteger<T> other) const
Retorna ` true ` se o valor de ` QLEInteger ` for igual ao valor de ` other`.
QLEInteger<T> &QLEInteger::operator>>=(T i)
Realiza um deslocamento à esquerda de i neste QLEInteger e retorna uma referência a esse objeto.
QLEInteger<T> &QLEInteger::operator^=(T i)
Realiza uma operação XOR bit a bit com i sobre este QLEInteger e retorna uma referência a este objeto.
QLEInteger<T> &QLEInteger::operator|=(T i)
Realiza uma operação OR bit a bit com i sobre este QLEInteger 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.