![]() |
Isis Developer Reference
|
Byte swapper. More...
#include <EndianSwapper.h>
Public Member Functions | |
EndianSwapper (QString inputEndian) | |
Constructs an EndianSwapper object, determining whether swapping of bytes actually needs to occur and sets the direction of swapping. | |
~EndianSwapper () | |
Destroys the EndianSwapper object. | |
double | Double (void *buf) |
Swaps a double precision value. | |
float | Float (void *buf) |
Swaps a floating point value. | |
int | ExportFloat (void *buf) |
Swaps a floating point value for Exporting. | |
int | Int (void *buf) |
Swaps a 4 byte integer value. | |
uint32_t | Uint32_t (void *buf) |
Swaps a 32bit unsigned integer. | |
long long int | LongLongInt (void *buf) |
Swaps an 8 byte integer value. | |
short int | ShortInt (void *buf) |
Swaps a short integer value. | |
unsigned short int | UnsignedShortInt (void *buf) |
Swaps an unsigned short integer value. | |
bool | willSwap () const |
Byte swapper.
This class is used to swap bytes on data that is from a different machine architecture.
Isis::EndianSwapper::EndianSwapper | ( | QString | inputEndian | ) |
Constructs an EndianSwapper object, determining whether swapping of bytes actually needs to occur and sets the direction of swapping.
inputEndian | Byte order of input value (MSB or LSB). |
References _FILEINFO_, Isis::IsLsb(), Isis::IsMsb(), and Isis::IException::Programmer.
Isis::EndianSwapper::~EndianSwapper | ( | ) |
Destroys the EndianSwapper object.
double Isis::EndianSwapper::Double | ( | void * | buf | ) |
Swaps a double precision value.
buf | Input double precision value to swap. |
int Isis::EndianSwapper::ExportFloat | ( | void * | buf | ) |
Swaps a floating point value for Exporting.
References Int().
float Isis::EndianSwapper::Float | ( | void * | buf | ) |
Swaps a floating point value.
buf | Input floating point value to swap. |
int Isis::EndianSwapper::Int | ( | void * | buf | ) |
Swaps a 4 byte integer value.
buf | Input integer value to swap. |
Referenced by ExportFloat().
long long int Isis::EndianSwapper::LongLongInt | ( | void * | buf | ) |
Swaps an 8 byte integer value.
buf | Input integer value to swap. |
short int Isis::EndianSwapper::ShortInt | ( | void * | buf | ) |
Swaps a short integer value.
buf | Input short integer value to swap. |
uint32_t Isis::EndianSwapper::Uint32_t | ( | void * | buf | ) |
Swaps a 32bit unsigned integer.
buf | Input uint32 integer value to swap. |
unsigned short int Isis::EndianSwapper::UnsignedShortInt | ( | void * | buf | ) |
Swaps an unsigned short integer value.
buf | Input unsigned short integer value to swap. |
|
inline |
Referenced by Isis::CubeIoHandler::CubeIoHandler().
char Isis::EndianSwapper::p_char[8] |
Union containing the output value in byte format.
double Isis::EndianSwapper::p_double |
Union containing the output double precision value with swapped bytes.
float Isis::EndianSwapper::p_float |
Union containing the output floating point value with swapped bytes.
int Isis::EndianSwapper::p_int |
Union containing the output 4 byte integer value with swapped bytes.
long long int Isis::EndianSwapper::p_longLongInt |
Union containing the output 8 byte integer value with swapped bytes.
short int Isis::EndianSwapper::p_shortInt |
Union containing the output 2 byte integer value with swapped bytes.
uint32_t Isis::EndianSwapper::p_uint32 |
Union containing the output uint32_t value with swapped bytes.
unsigned short int Isis::EndianSwapper::p_uShortInt |
Union containing the output unsigned short integer value with swapped bytes.
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 03/27/2024 15:36:24 |