My Project
|
Converter for binary data into Intel CPU format. More...
#include <SwapBytes.hh>
Public Member Functions | |
SwapBytes () | |
~SwapBytes () | |
void | swap (T *pBuffer, UInt8 BufferLength) |
Converter for binary data into Intel CPU format.
If you use Intel CPU or compatible, the binary data array read from disks should be convert by this class. Because the converted data array overwrites the source array, You can delete the object of this class just after calling swap().
When you use this class, you must define data type as following,
SwapBytes<UInt4> *converter1 = new SwapBytes<UInt4> //for integer
Constructor. You should define data type handled in this class as above example.
Execute the conversion. The argument of "pBuffer" is the pointer of array converted in this function, and "BufferLength" is the size of the array. The converted data array overwrites the old data.