#include <allprimitivetypes.h>
|
| AllPrimitiveTypes () |
|
| AllPrimitiveTypes (const AllPrimitiveTypes &a) |
|
| AllPrimitiveTypes (quint64 val) |
|
| AllPrimitiveTypes (qint64 val) |
|
| AllPrimitiveTypes (qint32 val) |
|
| AllPrimitiveTypes (quint32 val) |
|
| AllPrimitiveTypes (qint16 val) |
|
| AllPrimitiveTypes (quint16 val) |
|
| AllPrimitiveTypes (qint8 val) |
|
| AllPrimitiveTypes (quint8 val) |
|
| AllPrimitiveTypes (float val) |
|
| AllPrimitiveTypes (double val) |
|
bool | operator!= (AllPrimitiveTypes other) const |
|
bool | operator< (AllPrimitiveTypes other) const |
|
bool | operator== (AllPrimitiveTypes other) const |
|
bool | readBits (quint8 bitCount, const Okteta::AbstractByteArrayModel *input, QSysInfo::Endian byteOrder, Okteta::Address address, BitCount64 bitsRemaining, quint8 *const bitOffset) |
|
template<typename T > |
T | value () const |
|
template<> |
quint8 | value () const |
|
template<> |
quint16 | value () const |
|
template<> |
quint32 | value () const |
|
template<> |
quint64 | value () const |
|
template<> |
qint8 | value () const |
|
template<> |
qint16 | value () const |
|
template<> |
qint32 | value () const |
|
template<> |
qint64 | value () const |
|
template<> |
float | value () const |
|
template<> |
double | value () const |
|
bool | writeBits (quint8 bitCount, AllPrimitiveTypes newValue, Okteta::AbstractByteArrayModel *out, QSysInfo::Endian byteOrder, Okteta::Address address, BitCount64 bitsRemaining, quint8 *const bitOffset) |
|
This union holds the value of one primitive datatype.
Maximum size of a datatype is currently 64 bits. It has methods for reading and writing from Okteta::AbstractByteArrayModel
Definition at line 70 of file allprimitivetypes.h.
AllPrimitiveTypes::AllPrimitiveTypes |
( |
| ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
quint64 |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
qint64 |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
qint32 |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
quint32 |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
qint16 |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
quint16 |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
qint8 |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
quint8 |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
float |
val | ) |
|
|
inline |
AllPrimitiveTypes::AllPrimitiveTypes |
( |
double |
val | ) |
|
|
inline |
Reads given number of bits from input
and sets value of this union to the new value.
bitOffset
is changed in this method so it does not have to be handled later. There is no need to write an optimised version of this method for reading complete bytes since this is already handled internally.
On failure value of this union is set to 0
.
- Parameters
-
bitCount | the number of bits to read |
input | the byte array the value is read from |
byteOrder | the byteOrder used for reading values |
address | the address in input |
bitsRemaining | number of bytes remaining in input |
bitOffset | the bit to start at in the first byte |
- Returns
true
on success, false
otherwise
Definition at line 79 of file allprimitivetypes.cpp.
Read data of type T
from the model.
Range checking must have been performed before
- Parameters
-
input | the input to read from |
address | the starting address |
endianess | the endianess to use when reading |
bitOffset | the number of bits into the first byte (different depending on endianess) |
- Returns
- the read value
Definition at line 204 of file allprimitivetypes.h.
template<typename T >
T AllPrimitiveTypes::value |
( |
| ) |
const |
template<>
quint8 AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
quint16 AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
quint32 AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
quint64 AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
qint8 AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
qint16 AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
qint32 AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
qint64 AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
float AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
template<>
double AllPrimitiveTypes::value |
( |
| ) |
const |
|
inline |
Writes given number of bits to out
.
If the value of this union is not equal to newValue
it is set to newValue
. bitOffset
is changed in this method so it does not have to be handled later. There is no need to write an optimised version of this method for reading complete bytes since this is already handled internally.
On failure value of this union is set to 0
.
- Parameters
-
bitCount | the number of bits to read |
newValue | the new value of this union |
out | the byte array the value is read from |
byteOrder | the byteOrder used for reading values |
address | the address in out |
remaining | number of bytes remaining in input |
bitOffset | the bit to start at in the first byte |
- Returns
true
on success, false
otherwise
Definition at line 38 of file allprimitivetypes.cpp.
qint8 AllPrimitiveTypes::allBytes[8] |
The documentation for this union was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:11 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.