12 #ifdef DtUSE_UTILITIES_NAMESPACE
13 namespace DtUSE_UTILITIES_NAMESPACE
19 #define is_bigendian() ( (*(char*)&endianChecker) == 0 )
25 for(
int i = 0; i < ( theSize >> 1 ); ++i )
27 theEnd = ( theSize - 1 ) - i;
28 byteArray[ i ] ^= byteArray[ theEnd ];
29 byteArray[ theEnd ] ^= byteArray[ i ];
30 byteArray[ i ] ^= byteArray[ theEnd ];
37 unsigned short msbyte = rhs & 0x00ff;
38 unsigned short lsbyte = ( rhs & 0xff00 ) >> 8;
39 return ( msbyte << 8 ) | lsbyte;
47 return ( msword << 16 ) | lsword;
54 unsigned int mspart =
endianSwap32Bit( static_cast<unsigned int>(rhs & 0xffffffff) );
55 unsigned int lspart =
endianSwap32Bit(static_cast<unsigned int>(( rhs >> 32 ) & 0xffffffff) );
56 return (
DtU64 ( mspart ) << 32 ) | lspart;
59 #ifdef DtUSE_UTILITIES_NAMESPACE
static void swapByteArray(char *byteArray, int theSize)
Swap the byte array in memory.
Definition: vlEncodingHelpers.h:22
const int endianChecker
This checks whether the machine is Big Endian or Little Endian.
Definition: vlCgHelpers.h:43
unsigned long long DtU64
-------—— Network Layout for a long long (64 bytes unsigned)
Definition: vlMachineTypes.h:185
static DtU64 endianSwap64Bit(DtU64 rhs)
swap 64 bits
Definition: vlEncodingHelpers.h:51
unsigned short DtU16
A 16 bit unsigned integer value.
Definition: vlMachineTypes.h:140
static DtU16 endianSwap16Bit(DtU16 rhs)
swap 16 bits
Definition: vlEncodingHelpers.h:35
unsigned long DtU32
A 32 bit unsigned integer value.
Definition: vlMachineTypes.h:153
static DtU32 endianSwap32Bit(DtU32 rhs)
swap 32 bits
Definition: vlEncodingHelpers.h:43