This is the documentation for Enlighten.
module Endian Conversion
Functions
Name | Description |
---|---|
ByteSwap(T) | Generic swap that works for any built-in type <= 8 bytes. |
ByteSwap(float) | Generic swap that works for any built-in type <= 8 bytes. |
ByteSwap(double) | Generic swap that works for any built-in type <= 8 bytes. |
ByteSwap16(u16) | Fundamental byte-swapping macros. |
ByteSwap32(u32) | Fundamental byte-swapping macros. |
ByteSwap32F(float) | Fundamental byte-swapping macros. |
ByteSwap64(u64) | Fundamental byte-swapping macros. |
ByteSwapArray16(Geo::u16 *, Geo::u32) | Byte swap an array of 16-bit values. |
ByteSwapArray32(Geo::u32 *, Geo::u32) | Byte swap an array of 32-bit values. |
ByteSwapArray64(Geo::u64 *, Geo::u32) | Byte swap an array of 64-bit values. |
ByteSwapArrayFloat(float *, Geo::u32) | Byte swap an array of 32-bit float values. |
IsLittleEndian(void) | Returns true if little endian. |
WillConvertToCurrentEndian(EConvertEndianMode) | Will a conversion of mode result in moving to the current platform? If the result is true, the (incoming) data should be swapped before use. |
Defines
Name | Description |
---|---|
GEO_ARRAY_BSWAP_16 { Geo::ByteSwapArray16(reinterpret_cast<Geo::u16*>(pArray), elementCount); } | Array swapping macros. |
GEO_ARRAY_BSWAP_32 { Geo::ByteSwapArray32(reinterpret_cast<Geo::u32*>(pArray), elementCount); } | Array swapping macros. |
GEO_ARRAY_BSWAP_32F { Geo::ByteSwapArrayFloat(reinterpret_cast<float*>(pArray), elementCount); } | Array swapping macros. |
GEO_ARRAY_BSWAP_64 { Geo::ByteSwapArray64(reinterpret_cast<Geo::u64*>(pArray), elementCount); } | Array swapping macros. |
GEO_BSWAP_16 (Geo::ByteSwap16(x)) | Fundamental byte-swapping macros. |
GEO_BSWAP_32 (Geo::ByteSwap32(x)) | Fundamental byte-swapping macros. |
GEO_BSWAP_32F (Geo::ByteSwap32F(x)) | Fundamental byte-swapping macros. |
GEO_BSWAP_64 (Geo::ByteSwap64(x)) | Fundamental byte-swapping macros. |
Enums
Name | Description |
---|---|
EConvertEndianMode | Enumeration used to control behaviour of various endian swapping functions. |
T Geo::ByteSwap
public: T ByteSwap
(
T x
)
Generic swap that works for any built-in type <= 8 bytes.
float Geo::ByteSwap
public: float ByteSwap
(
float x
)
Generic swap that works for any built-in type <= 8 bytes.
double Geo::ByteSwap
public: double ByteSwap
(
double x
)
Generic swap that works for any built-in type <= 8 bytes.
u16 Geo::ByteSwap16
public: u16 ByteSwap16
(
u16 x
)
Fundamental byte-swapping macros.
u32 Geo::ByteSwap32
public: u32 ByteSwap32
(
u32 x
)
Fundamental byte-swapping macros.
float Geo::ByteSwap32F
public: float ByteSwap32F
(
float x
)
Fundamental byte-swapping macros.
u64 Geo::ByteSwap64
public: u64 ByteSwap64
(
u64 x
)
Fundamental byte-swapping macros.
void GEO_CALL Geo::ByteSwapArray16
public: void GEO_CALL ByteSwapArray16
(
Geo::u16 * pArray,
Geo::u32 elementCount
)
Byte swap an array of 16-bit values.
void GEO_CALL Geo::ByteSwapArray32
public: void GEO_CALL ByteSwapArray32
(
Geo::u32 * pArray,
Geo::u32 elementCount
)
Byte swap an array of 32-bit values.
void GEO_CALL Geo::ByteSwapArray64
public: void GEO_CALL ByteSwapArray64
(
Geo::u64 * pArray,
Geo::u32 elementCount
)
Byte swap an array of 64-bit values.
void GEO_CALL Geo::ByteSwapArrayFloat
public: void GEO_CALL ByteSwapArrayFloat
(
float * pArray,
Geo::u32 elementCount
)
Byte swap an array of 32-bit float values.
bool Geo::IsLittleEndian
public: bool IsLittleEndian
(
void
)
Returns true if little endian.
bool Geo::WillConvertToCurrentEndian
public: bool WillConvertToCurrentEndian
(
EConvertEndianMode mode
)
Will a conversion of mode result in moving to the current platform? If the result is true, the (incoming) data should be swapped before use.
If the result is false, the (outgoing) data should be used before swapped. If the mode is ecemNone, the result is undefined.
EConvertEndianMode
public: enum EConvertEndianMode
{
ecemNone = 0,
ecemLittleToBig = 1,
ecemBigToLittle = 2,
ecemLittleToNative = ecemNone,
ecemBigToNative = ecemBigToLittle,
ecemNativeToLittle = ecemNone,
ecemNativeToBig = ecemLittleToBig
}
Enumeration used to control behaviour of various endian swapping functions.
Determines the direction of the conversion operation.
enumerators
ecemNone | |
ecemLittleToBig | |
ecemBigToLittle | |
ecemLittleToNative | |
ecemBigToNative | |
ecemNativeToLittle | |
ecemNativeToBig |