QBEInteger Class
template <typename T> class QBEIntegerLa classe QBEInteger fornisce interi in formato big-endian indipendenti dalla piattaforma. Per saperne di più...
| Intestazione: | #include <QBEInteger> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
Funzioni pubbliche
| 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) |
Membri pubblici statici
Descrizione dettagliata
QBEInteger<T> memorizza un valore intero nell'ordine dei byte big-endian, dove T specifica il tipo intero C++ sottostante. Il parametro del modello T deve essere un tipo intero C++:
- 8 bit: char, signed char, unsigned char, qint8, quint8
- 16 bit: short, unsigned short, qint16, quint16, char16_t
- 32 bit: int, unsigned int, qint32, quint32, char32_t
- 64 bit: long long, unsigned long long, qint64, quint64
- dimensione specifica della piattaforma: long, unsigned long
- dimensione puntatore: qintptr, quintptr, qptrdiff
Nota: l'uso di questa classe potrebbe risultare più lento rispetto all'uso di interi nativi, pertanto utilizzarla solo quando è richiesta un'endianità esatta.
Documentazione delle funzioni membro
[explicit constexpr] QBEInteger::QBEInteger(T value)
Crea un oggetto QBEInteger con il valore specificato in ` value`.
[static constexpr] QBEInteger<T> QBEInteger::max()
Restituisce il valore massimo (finito) rappresentabile dal tipo numerico T.
[static constexpr] QBEInteger<T> QBEInteger::min()
Restituisce il valore minimo (finito) rappresentabile dal tipo numerico T.
QBEInteger::operator T() const
Restituisce il valore di questo oggetto ` QBEInteger ` come numero intero nativo.
bool QBEInteger::operator!=(QBEInteger<T> other) const
Restituisce " true " se il valore di " QBEInteger " non è uguale al valore di " other".
QBEInteger<T> &QBEInteger::operator%=(T i)
Imposta questo oggetto QBEInteger sul resto della divisione tra i e restituisce un riferimento a tale oggetto.
QBEInteger<T> &QBEInteger::operator&=(T i)
Esegue un'operazione AND bit a bit con i su questo QBEInteger e restituisce un riferimento a questo oggetto.
QBEInteger<T> &QBEInteger::operator*=(T i)
Moltiplica ` i ` per questo ` QBEInteger ` e restituisce un riferimento a questo oggetto.
QBEInteger<T> &QBEInteger::operator++()
Esegue un'operazione di " ++ " (incremento) sul prefisso di questo oggetto " QBEInteger " e restituisce un riferimento a tale oggetto.
QBEInteger<T> QBEInteger::operator++(int)
Esegue un'operazione di incremento postfissa ( ++ ) su questo oggetto ` QBEInteger ` e restituisce un riferimento a tale oggetto.
QBEInteger<T> &QBEInteger::operator+=(T i)
Aggiunge un oggetto ` i ` a questo ` QBEInteger ` e restituisce un riferimento a tale oggetto.
QBEInteger<T> &QBEInteger::operator--()
Esegue un'operazione di decremento ( -- ) sul prefisso di questo oggetto QBEInteger e restituisce un riferimento a tale oggetto.
QBEInteger<T> QBEInteger::operator--(int)
Esegue un'operazione di decremento ( -- ) postfissa su questo oggetto ` QBEInteger ` e restituisce un riferimento a tale oggetto.
QBEInteger<T> &QBEInteger::operator-=(T i)
Sottrae ` i ` da ` QBEInteger ` e restituisce un riferimento a questo oggetto.
QBEInteger<T> &QBEInteger::operator/=(T i)
Divide questo QBEInteger con i e restituisce un riferimento a questo oggetto.
QBEInteger<T> &QBEInteger::operator<<=(T i)
Esegue uno spostamento a destra di i su questo QBEInteger e restituisce un riferimento a questo oggetto.
QBEInteger<T> &QBEInteger::operator=(T i)
Assegna i a questo QBEInteger e restituisce un riferimento a questo QBEInteger.
bool QBEInteger::operator==(QBEInteger<T> other) const
Restituisce " true " se il valore di questo " QBEInteger " è uguale al valore di " other".
QBEInteger<T> &QBEInteger::operator>>=(T i)
Esegue uno spostamento a sinistra di i su questo QBEInteger e restituisce un riferimento a questo oggetto.
QBEInteger<T> &QBEInteger::operator^=(T i)
Esegue un'operazione XOR bit a bit con i su questo QBEInteger e restituisce un riferimento a questo oggetto.
QBEInteger<T> &QBEInteger::operator|=(T i)
Esegue un’operazione OR bit a bit con i su questo QBEInteger e restituisce un riferimento a questo oggetto.
© 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.