My Project
Public Member Functions
SwapBytes< T > Class Template Reference

Converter for binary data into Intel CPU format. More...

#include <SwapBytes.hh>

List of all members.

Public Member Functions

 SwapBytes ()
 ~SwapBytes ()
void swap (T *pBuffer, UInt8 BufferLength)

Detailed Description

template<class T>
class SwapBytes< T >

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 & Destructor Documentation

template<class T >
SwapBytes< T >::SwapBytes ( )

Constructor. You should define data type handled in this class as above example.

template<class T >
SwapBytes< T >::~SwapBytes ( )

Destructor.


Member Function Documentation

template<class T >
void SwapBytes< T >::swap ( T *  pBuffer,
UInt8  BufferLength 
)

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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Friends