OEGetHostEndianΒΆ

template<class T>
unsigned char OEGetHostEndian()
template<>
unsigned char OEGetHostEndian<int>()
template<>
unsigned char OEGetHostEndian<unsigned int>()
template<>
unsigned char OEGetHostEndian<float>()
template<>
unsigned char OEGetHostEndian<double>()
template<>
unsigned char OEGetHostEndian<short>()
template<>
unsigned char OEGetHostEndian<oefpos_t>()
template<>
unsigned char OEGetHostEndian<OEPlatform::OEHalfFloat>()

Returns the endianess of this machine so it can be encoded to a binary output file. The byte is used to indicate whether multi-byte binary values will need to be swapped when read on a different machine.

See also

Designed to work in conjunction with OEGetFileEndian. The byte returned by OEGetHostEndian should be written to the output file, then OEGetFileEndian will determine whether the bytes of the given type T need to be swapped while being read by OEBReadData.