Isis 3 Developer Reference
Isis::EndianSwapper Class Reference

Byte swapper. More...

#include <EndianSwapper.h>

Collaboration diagram for Isis::EndianSwapper:
Collaboration graph

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. More...
 
 ~EndianSwapper ()
 Destroys the EndianSwapper object. More...
 
double Double (void *buf)
 Swaps a double precision value. More...
 
float Float (void *buf)
 Swaps a floating point value. More...
 
int ExportFloat (void *buf)
 Swaps a floating point value for Exporting. More...
 
int Int (void *buf)
 Swaps a 4 byte integer value. More...
 
uint32_t Uint32_t (void *buf)
 Swaps a 32bit unsigned integer. More...
 
long long int LongLongInt (void *buf)
 Swaps an 8 byte integer value. More...
 
short int ShortInt (void *buf)
 Swaps a short integer value. More...
 
unsigned short int UnsignedShortInt (void *buf)
 Swaps an unsigned short integer value. More...
 
bool willSwap () const
 

Detailed Description

Byte swapper.

This class is used to swap bytes on data that is from a different machine architecture.

Author
2002-07-10 Tracie Sucharski

Constructor & Destructor Documentation

◆ EndianSwapper()

Isis::EndianSwapper::EndianSwapper ( QString  inputEndian)

Constructs an EndianSwapper object, determining whether swapping of bytes actually needs to occur and sets the direction of swapping.

Parameters
inputEndianByte order of input value (MSB or LSB).

References _FILEINFO_, Isis::IsLsb(), and Isis::IsMsb().

◆ ~EndianSwapper()

Isis::EndianSwapper::~EndianSwapper ( )

Destroys the EndianSwapper object.

Member Function Documentation

◆ Double()

double Isis::EndianSwapper::Double ( void *  buf)

Swaps a double precision value.

Parameters
bufInput double precision value to swap.

Referenced by Isis::Spice::getStoredResult(), Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), Isis::ProcessImport::ProcessBsq(), and Isis::Spice::storeResult().

◆ ExportFloat()

int Isis::EndianSwapper::ExportFloat ( void *  buf)

Swaps a floating point value for Exporting.

◆ Float()

float Isis::EndianSwapper::Float ( void *  buf)

Swaps a floating point value.

Parameters
bufInput floating point value to swap.

Referenced by Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), and Isis::ProcessImport::ProcessBsq().

◆ Int()

int Isis::EndianSwapper::Int ( void *  buf)

Swaps a 4 byte integer value.

Parameters
bufInput integer value to swap.

Referenced by Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), and Isis::ProcessImport::ProcessBsq().

◆ LongLongInt()

long long int Isis::EndianSwapper::LongLongInt ( void *  buf)

Swaps an 8 byte integer value.

Parameters
bufInput integer value to swap.

◆ ShortInt()

short int Isis::EndianSwapper::ShortInt ( void *  buf)

Swaps a short integer value.

Parameters
bufInput short integer value to swap.

Referenced by Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), and Isis::ProcessImport::ProcessBsq().

◆ Uint32_t()

uint32_t Isis::EndianSwapper::Uint32_t ( void *  buf)

Swaps a 32bit unsigned integer.

Parameters
bufInput uint32 integer value to swap.

Referenced by Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), and Isis::ProcessImport::ProcessBsq().

◆ UnsignedShortInt()

unsigned short int Isis::EndianSwapper::UnsignedShortInt ( void *  buf)

Swaps an unsigned short integer value.

Parameters
bufInput unsigned short integer value to swap.

Referenced by Isis::ProcessImport::ProcessBil(), Isis::ProcessImport::ProcessBip(), and Isis::ProcessImport::ProcessBsq().

◆ willSwap()

bool Isis::EndianSwapper::willSwap ( ) const
inline

Member Data Documentation

◆ p_char

char Isis::EndianSwapper::p_char[8]

Union containing the output value in byte format.

◆ p_double

double Isis::EndianSwapper::p_double

Union containing the output double precision value with swapped bytes.

◆ p_float

float Isis::EndianSwapper::p_float

Union containing the output floating point value with swapped bytes.

◆ p_int

int Isis::EndianSwapper::p_int

Union containing the output 4 byte integer value with swapped bytes.

◆ p_longLongInt

long long int Isis::EndianSwapper::p_longLongInt

Union containing the output 8 byte integer value with swapped bytes.

◆ p_shortInt

short int Isis::EndianSwapper::p_shortInt

Union containing the output 2 byte integer value with swapped bytes.

◆ p_uint32

uint32_t Isis::EndianSwapper::p_uint32

Union containing the output uint32_t value with swapped bytes.

◆ p_uShortInt

unsigned short int Isis::EndianSwapper::p_uShortInt

Union containing the output unsigned short integer value with swapped bytes.


The documentation for this class was generated from the following files: