#include <itkByteSwapper.h>
Inheritance diagram for itk::ByteSwapper< T >:
Public Types | |
typedef ByteSwapper | Self |
typedef Object | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef std::ostream | OStreamType |
Public Member Functions | |
virtual const char * | GetClassName () const |
Static Public Member Functions | |
void | SwapFromSystemToBigEndian (T *p) |
void | SwapRangeFromSystemToBigEndian (T *p, unsigned long num) |
void | SwapFromSystemToLittleEndian (T *p) |
void | SwapRangeFromSystemToLittleEndian (T *p, unsigned long num) |
bool | SystemIsBigEndian () |
bool | SystemIsBE () |
bool | SystemIsLittleEndian () |
bool | SystemIsLE () |
void | SwapWriteRangeFromSystemToBigEndian (T *p, int num, OStreamType *fp) |
void | SwapWriteRangeFromSystemToLittleEndian (T *p, int num, OStreamType *fp) |
Protected Member Functions | |
ByteSwapper () | |
~ByteSwapper () | |
Static Protected Member Functions | |
void | Swap2 (void *p) |
void | Swap2Range (void *p, unsigned long num) |
void | SwapWrite2Range (void *p, unsigned long num, OStreamType *fp) |
void | Swap4 (void *p) |
void | Swap4Range (void *p, unsigned long num) |
void | SwapWrite4Range (void *p, unsigned long num, OStreamType *fp) |
void | Swap8 (void *p) |
void | Swap8Range (void *p, unsigned long num) |
void | SwapWrite8Range (void *p, unsigned long num, OStreamType *fp) |
ByteSwapper is used by I/O classes to perform machine dependent byte swapping. Byte swapping is often used when reading or writing binary files. Files can either be Big Endian (BE) or Little Endian (LE).
Definition at line 41 of file itkByteSwapper.h.
|
Reimplemented from itk::Object. Definition at line 48 of file itkByteSwapper.h. |
|
Work around MSVC bug (including ByteSwapper.h in a templated class). Definition at line 51 of file itkByteSwapper.h. Referenced by itk::ByteSwapper< T >::~ByteSwapper(). |
|
Reimplemented from itk::Object. Definition at line 47 of file itkByteSwapper.h. |
|
Standard class typedefs. Reimplemented from itk::Object. Definition at line 45 of file itkByteSwapper.h. |
|
Reimplemented from itk::Object. Definition at line 46 of file itkByteSwapper.h. |
|
Definition at line 112 of file itkByteSwapper.h. |
|
Definition at line 113 of file itkByteSwapper.h. References itk::ByteSwapper< T >::OStreamType. |
|
Run-time type information (and related methods). Reimplemented from itk::Object.
|
|
Swap 2 bytes. |
|
Swap a range of two-byte words. Num is the number of two-byte words to swap. |
|
Swap four bytes. |
|
Swap a range of four-byte words. Num is the number of four-byte words to swap. |
|
Swap 8 bytes. |
|
Swap a range of four-byte words. Num is the number of four-byte words to swap. |
|
Generic swap method handles type T. The swapping is done in-place. Either 2-byte or 4-byte swapping can be handled. Single byte types are not swapped; others raise an exception. The method is used to swap to and from Big Endian. |
|
Generic swap method handles type T. The swapping is done in-place. Either 2-byte or 4-byte swapping can be handled. Single byte types are not swapped; others raise an exception. The method is used to swap to and from Little Endian. |
|
Generic swap method handles type T. The swapping is done in-place. Either 2-byte or 4-byte swapping can be handled. Single byte types are not swapped; others raise an exception. The method is used to swap to and from Big Endian. |
|
Generic swap method handles type T. The swapping is done in-place. Either 2-byte or 4-byte swapping can be handled. Single byte types are not swapped; others raise an exception. The method is used to swap to and from Little Endian. |
|
Swap and write a range of two-byte words. Num is the number of two-byte words to swap and write. |
|
Swap and write a range of four-byte words. Num is the number of four-byte words to swap and write. |
|
Swap and write a range of 8-byte words. Num is the number of four-byte words to swap and write. |
|
Generic swap method handles type T. The data is swapped and written (in binary) to the ostream given. A total of num values of type T are written and swapped. Either 2-byte or 4-byte swapping can be handled. Single byte types are not swapped; others raise an exception. The method is used to swap to and from Big Endian. |
|
Generic swap method handles type T. The data is swapped and written (in binary) to the ostream given. A total of num values of type T are written and swapped. Either 2-byte or 4-byte swapping can be handled. Single byte types are not swapped; others raise an exception. The method is used to swap to and from Little Endian. |
|
Query the machine Endian-ness. Definition at line 58 of file itkByteSwapper.h. |
|
Query the machine Endian-ness. |
|
Query the machine Endian-ness. Definition at line 60 of file itkByteSwapper.h. |
|
Query the machine Endian-ness. |