#ifndef Formatting_hh #define Formatting_hh class SameFormat { public: template class B, typename U> void Read(B& buf, U& data); template void Reverse(Integer& value) {} template class B, typename U> void ReadBlock(B& buf, U* data, unsigned int elements); }; class LeastSignificantFirst { public: template class B> void Read(B& buf, uint16_t&); template class B> void Read(B& buf, uint32_t&); template class B> void Read(B& buf, uint64_t&); template class B> void Read(B& buf, float&); template class B> void Read(B& buf, double&); template void Reverse(Integer& value); template class B, typename U> void ReadBlock(B& buf, U* data, unsigned int elements); template class B> void ReadBlock(B& buf, uint8_t* data, unsigned int elements); template class B> void ReadBlock(B& buf, int8_t* data, unsigned int elements); }; class MostSignificantFirst { public: template class B> void Read(B& buf, uint16_t&); template class B> void Read(B& buf, uint32_t&); template class B> void Read(B& buf, uint64_t&); template class B> void Read(B& buf, float&); template class B> void Read(B& buf, double&); template void Reverse(Integer& value); template class B, typename U> void ReadBlock(B& buf, U* data, unsigned int elements); template class B> void ReadBlock(B& buf, uint8_t* data, unsigned int elements); template class B> void ReadBlock(B& buf, int8_t* data, unsigned int elements); }; uint8_t const least_significant_first = 0; uint8_t const most_significant_first = 1; #include #endif