JUCE
|
Contains static methods for converting the byte order between different endiannesses. More...
Static Public Member Functions | |
static uint16 | swap (uint16 value) noexcept |
Swaps the upper and lower bytes of a 16-bit integer. More... | |
static uint32 | swap (uint32 value) noexcept |
Reverses the order of the 4 bytes in a 32-bit integer. More... | |
static uint64 | swap (uint64 value) noexcept |
Reverses the order of the 8 bytes in a 64-bit integer. More... | |
static uint16 | swapIfBigEndian (uint16 value) noexcept |
Swaps the byte order of a 16-bit unsigned int if the CPU is big-endian. More... | |
static uint32 | swapIfBigEndian (uint32 value) noexcept |
Swaps the byte order of a 32-bit unsigned int if the CPU is big-endian. More... | |
static uint64 | swapIfBigEndian (uint64 value) noexcept |
Swaps the byte order of a 64-bit unsigned int if the CPU is big-endian. More... | |
static int16 | swapIfBigEndian (int16 value) noexcept |
Swaps the byte order of a 16-bit signed int if the CPU is big-endian. More... | |
static int32 | swapIfBigEndian (int32 value) noexcept |
Swaps the byte order of a 32-bit signed int if the CPU is big-endian. More... | |
static int64 | swapIfBigEndian (int64 value) noexcept |
Swaps the byte order of a 64-bit signed int if the CPU is big-endian. More... | |
static float | swapIfBigEndian (float value) noexcept |
Swaps the byte order of a 32-bit float if the CPU is big-endian. More... | |
static double | swapIfBigEndian (double value) noexcept |
Swaps the byte order of a 64-bit float if the CPU is big-endian. More... | |
static uint16 | swapIfLittleEndian (uint16 value) noexcept |
Swaps the byte order of a 16-bit unsigned int if the CPU is little-endian. More... | |
static uint32 | swapIfLittleEndian (uint32 value) noexcept |
Swaps the byte order of a 32-bit unsigned int if the CPU is little-endian. More... | |
static uint64 | swapIfLittleEndian (uint64 value) noexcept |
Swaps the byte order of a 64-bit unsigned int if the CPU is little-endian. More... | |
static int16 | swapIfLittleEndian (int16 value) noexcept |
Swaps the byte order of a 16-bit signed int if the CPU is little-endian. More... | |
static int32 | swapIfLittleEndian (int32 value) noexcept |
Swaps the byte order of a 32-bit signed int if the CPU is little-endian. More... | |
static int64 | swapIfLittleEndian (int64 value) noexcept |
Swaps the byte order of a 64-bit signed int if the CPU is little-endian. More... | |
static float | swapIfLittleEndian (float value) noexcept |
Swaps the byte order of a 32-bit float if the CPU is little-endian. More... | |
static double | swapIfLittleEndian (double value) noexcept |
Swaps the byte order of a 64-bit float if the CPU is little-endian. More... | |
static uint32 | littleEndianInt (const void *bytes) noexcept |
Turns 4 bytes into a little-endian integer. More... | |
static uint64 | littleEndianInt64 (const void *bytes) noexcept |
Turns 8 bytes into a little-endian integer. More... | |
static uint16 | littleEndianShort (const void *bytes) noexcept |
Turns 2 bytes into a little-endian integer. More... | |
static uint32 | bigEndianInt (const void *bytes) noexcept |
Turns 4 bytes into a big-endian integer. More... | |
static uint64 | bigEndianInt64 (const void *bytes) noexcept |
Turns 8 bytes into a big-endian integer. More... | |
static uint16 | bigEndianShort (const void *bytes) noexcept |
Turns 2 bytes into a big-endian integer. More... | |
static int | littleEndian24Bit (const void *bytes) noexcept |
Converts 3 little-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits). More... | |
static int | bigEndian24Bit (const void *bytes) noexcept |
Converts 3 big-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits). More... | |
static void | littleEndian24BitToChars (int value, void *destBytes) noexcept |
Copies a 24-bit number to 3 little-endian bytes. More... | |
static void | bigEndian24BitToChars (int value, void *destBytes) noexcept |
Copies a 24-bit number to 3 big-endian bytes. More... | |
static bool | isBigEndian () noexcept |
Returns true if the current CPU is big-endian. More... | |
Contains static methods for converting the byte order between different endiannesses.
Swaps the upper and lower bytes of a 16-bit integer.
Referenced by swap(), and swapIfBigEndian().
Reverses the order of the 4 bytes in a 32-bit integer.
Reverses the order of the 8 bytes in a 64-bit integer.
References bigEndianInt(), bigEndianInt64(), bigEndianShort(), isBigEndian(), littleEndianInt(), littleEndianInt64(), littleEndianShort(), swap(), swapIfBigEndian(), and swapIfLittleEndian().
Swaps the byte order of a 16-bit unsigned int if the CPU is big-endian.
Referenced by swap().
Swaps the byte order of a 32-bit unsigned int if the CPU is big-endian.
Swaps the byte order of a 64-bit unsigned int if the CPU is big-endian.
Swaps the byte order of a 16-bit signed int if the CPU is big-endian.
Swaps the byte order of a 32-bit signed int if the CPU is big-endian.
Swaps the byte order of a 64-bit signed int if the CPU is big-endian.
|
staticnoexcept |
Swaps the byte order of a 32-bit float if the CPU is big-endian.
References swap().
|
staticnoexcept |
Swaps the byte order of a 64-bit float if the CPU is big-endian.
References swap().
Swaps the byte order of a 16-bit unsigned int if the CPU is little-endian.
Referenced by swap().
Swaps the byte order of a 32-bit unsigned int if the CPU is little-endian.
Swaps the byte order of a 64-bit unsigned int if the CPU is little-endian.
Swaps the byte order of a 16-bit signed int if the CPU is little-endian.
Swaps the byte order of a 32-bit signed int if the CPU is little-endian.
Swaps the byte order of a 64-bit signed int if the CPU is little-endian.
|
staticnoexcept |
Swaps the byte order of a 32-bit float if the CPU is little-endian.
|
staticnoexcept |
Swaps the byte order of a 64-bit float if the CPU is little-endian.
|
staticnoexcept |
Turns 4 bytes into a little-endian integer.
Referenced by swap().
|
staticnoexcept |
Turns 8 bytes into a little-endian integer.
Referenced by swap().
|
staticnoexcept |
Turns 2 bytes into a little-endian integer.
Referenced by swap().
|
staticnoexcept |
Turns 4 bytes into a big-endian integer.
Referenced by swap().
|
staticnoexcept |
Turns 8 bytes into a big-endian integer.
Referenced by swap().
|
staticnoexcept |
Turns 2 bytes into a big-endian integer.
Referenced by swap().
|
staticnoexcept |
Converts 3 little-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits).
|
staticnoexcept |
Converts 3 big-endian bytes into a signed 24-bit value (which is sign-extended to 32 bits).
|
staticnoexcept |
Copies a 24-bit number to 3 little-endian bytes.
|
staticnoexcept |
Copies a 24-bit number to 3 big-endian bytes.
|
staticnoexcept |
Returns true if the current CPU is big-endian.
Referenced by swap().