OEGetFileEndian¶
template<class T>
bool OEGetFileEndian(unsigned int)
template<>
bool OEGetFileEndian<int>(unsigned int byte)
template<>
bool OEGetFileEndian<unsigned int>(unsigned int byte)
template<>
bool OEGetFileEndian<float>(unsigned int byte)
template<>
bool OEGetFileEndian<double>(unsigned int byte)
template<>
bool OEGetFileEndian<short>(unsigned int byte)
template<>
bool OEGetFileEndian<oefpos_t>(unsigned int byte)
template<>
bool OEGetFileEndian<OEPlatform::OEHalfFloat>(unsigned int byte)
Given the endianness encoded in the byte, return whether this
machine needs to swap bytes for the given data type T. Always
returns false if sizeof(T) is 1. Will fail to compile if
the size is greater than 1 and an explicit template specialization
is not given.
See also
Designed to work in conjunction with
OEGetHostEndian. 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.