NRLib::NRLibPrivate Namespace Reference

Classes

union  DoubleAsLongLong
 
union  FloatAsInt
 
class  UnsafeParser
 
class  UnsafeParser< double >
 
class  UnsafeParser< float >
 
class  UnsafeParser< int >
 

Functions

void ParseUInt16LE (const char *buffer, unsigned short &ui)
 Parse unsigned 32-bit integer from little-endian buffer. More...
 
void WriteUInt16BE (char *buffer, unsigned short us)
 Write unsigned 32-bit integer to big-endian buffer. More...
 
void WriteUInt16LE (char *buffer, unsigned short us)
 Write unsigned 32-bit integer to little-endian buffer. More...
 
void ParseUInt32LE (const char *buffer, unsigned int &ui)
 Parse unsigned 32-bit integer from little-endian buffer. More...
 
void WriteUInt32BE (char *buffer, unsigned int ui)
 Write unsigned 32-bit integer to big-endian buffer. More...
 
void WriteUInt32LE (char *buffer, unsigned int ui)
 Write unsigned 32-bit integer to little-endian buffer. More...
 
void ParseIEEEFloatLE (const char *buffer, float &f)
 Parse IEEE single-precision float from little-endian buffer. More...
 
void WriteIEEEFloatBE (char *buffer, float f)
 Write IEEE single-precision float to big-endian buffer. More...
 
void WriteIEEEFloatLE (char *buffer, float f)
 Write IEEE single-precision float to little-endian buffer. More...
 
void ParseIEEEDoubleBE (const char *buffer, double &d)
 Parse IEEE double-precision float from big-endian buffer. More...
 
void ParseIEEEDoubleLE (const char *buffer, double &d)
 Parse IEEE double-precision float from little-endian buffer. More...
 
void WriteIEEEDoubleBE (char *buffer, double d)
 Write IEEE double-precision float to big-endian buffer. More...
 
void WriteIEEEDoubleLE (char *buffer, double d)
 Write IEEE double-precision float to little-endian buffer. More...
 
void ParseIBMFloatLE (const char *buffer, float &f)
 Parse IEEE double-precision float from little-endian buffer. More...
 
void WriteIBMFloatBE (char *buffer, float f)
 Write IEEE double-precision float to big-endian buffer. More...
 
void WriteIBMFloatLE (char *buffer, float f)
 Write IEEE double-precision float to little-endian buffer. More...
 
bool Equal (double a, double b)
 

Function Documentation

◆ Equal()

bool NRLib::NRLibPrivate::Equal ( double  a,
double  b 
)

◆ ParseIBMFloatLE()

void NRLib::NRLibPrivate::ParseIBMFloatLE ( const char *  buffer,
float &  f 
)
inline

Parse IEEE double-precision float from little-endian buffer.

References buffer, NRLib::NRLibPrivate::FloatAsInt::f, Ibm2Ieee(), and NRLib::NRLibPrivate::FloatAsInt::ui.

Referenced by NRLib::ReadBinaryIbmFloatArray().

◆ ParseIEEEDoubleBE()

void NRLib::NRLibPrivate::ParseIEEEDoubleBE ( const char *  buffer,
double &  d 
)
inline

Parse IEEE double-precision float from big-endian buffer.

References buffer, NRLib::NRLibPrivate::DoubleAsLongLong::d, and NRLib::NRLibPrivate::DoubleAsLongLong::ull.

Referenced by NRLib::ReadBinaryDoubleArray().

◆ ParseIEEEDoubleLE()

void NRLib::NRLibPrivate::ParseIEEEDoubleLE ( const char *  buffer,
double &  d 
)
inline

Parse IEEE double-precision float from little-endian buffer.

References buffer, NRLib::NRLibPrivate::DoubleAsLongLong::d, and NRLib::NRLibPrivate::DoubleAsLongLong::ull.

Referenced by NRLib::ReadBinaryDoubleArray().

◆ ParseIEEEFloatLE()

void NRLib::NRLibPrivate::ParseIEEEFloatLE ( const char *  buffer,
float &  f 
)
inline

Parse IEEE single-precision float from little-endian buffer.

References buffer, NRLib::NRLibPrivate::FloatAsInt::f, and NRLib::NRLibPrivate::FloatAsInt::ui.

Referenced by NRLib::ReadBinaryFloatArray().

◆ ParseUInt16LE()

void NRLib::NRLibPrivate::ParseUInt16LE ( const char *  buffer,
unsigned short &  ui 
)
inline

Parse unsigned 32-bit integer from little-endian buffer.

References buffer.

Referenced by NRLib::ReadBinaryShortArray().

◆ ParseUInt32LE()

void NRLib::NRLibPrivate::ParseUInt32LE ( const char *  buffer,
unsigned int &  ui 
)
inline

Parse unsigned 32-bit integer from little-endian buffer.

References buffer.

Referenced by NRLib::ReadBinaryIntArray().

◆ WriteIBMFloatBE()

void NRLib::NRLibPrivate::WriteIBMFloatBE ( char *  buffer,
float  f 
)
inline

Write IEEE double-precision float to big-endian buffer.

References buffer, NRLib::NRLibPrivate::FloatAsInt::f, Ieee2Ibm(), masks, and NRLib::NRLibPrivate::FloatAsInt::ui.

Referenced by NRLib::WriteBinaryIbmFloatArray().

◆ WriteIBMFloatLE()

void NRLib::NRLibPrivate::WriteIBMFloatLE ( char *  buffer,
float  f 
)
inline

Write IEEE double-precision float to little-endian buffer.

References buffer, NRLib::NRLibPrivate::FloatAsInt::f, Ieee2Ibm(), masks, and NRLib::NRLibPrivate::FloatAsInt::ui.

Referenced by NRLib::WriteBinaryIbmFloatArray().

◆ WriteIEEEDoubleBE()

void NRLib::NRLibPrivate::WriteIEEEDoubleBE ( char *  buffer,
double  d 
)
inline

Write IEEE double-precision float to big-endian buffer.

References buffer, NRLib::NRLibPrivate::DoubleAsLongLong::d, lmasks, and NRLib::NRLibPrivate::DoubleAsLongLong::ull.

Referenced by NRLib::WriteBinaryDoubleArray().

◆ WriteIEEEDoubleLE()

void NRLib::NRLibPrivate::WriteIEEEDoubleLE ( char *  buffer,
double  d 
)
inline

Write IEEE double-precision float to little-endian buffer.

References buffer, NRLib::NRLibPrivate::DoubleAsLongLong::d, lmasks, and NRLib::NRLibPrivate::DoubleAsLongLong::ull.

Referenced by NRLib::WriteBinaryDoubleArray().

◆ WriteIEEEFloatBE()

void NRLib::NRLibPrivate::WriteIEEEFloatBE ( char *  buffer,
float  f 
)
inline

Write IEEE single-precision float to big-endian buffer.

References buffer, NRLib::NRLibPrivate::FloatAsInt::f, masks, and NRLib::NRLibPrivate::FloatAsInt::ui.

Referenced by NRLib::WriteBinaryFloatArray().

◆ WriteIEEEFloatLE()

void NRLib::NRLibPrivate::WriteIEEEFloatLE ( char *  buffer,
float  f 
)
inline

Write IEEE single-precision float to little-endian buffer.

References buffer, NRLib::NRLibPrivate::FloatAsInt::f, masks, and NRLib::NRLibPrivate::FloatAsInt::ui.

Referenced by NRLib::WriteBinaryFloatArray().

◆ WriteUInt16BE()

void NRLib::NRLibPrivate::WriteUInt16BE ( char *  buffer,
unsigned short  us 
)
inline

Write unsigned 32-bit integer to big-endian buffer.

References buffer, and smasks.

Referenced by NRLib::WriteBinaryShortArray().

◆ WriteUInt16LE()

void NRLib::NRLibPrivate::WriteUInt16LE ( char *  buffer,
unsigned short  us 
)
inline

Write unsigned 32-bit integer to little-endian buffer.

References buffer, and smasks.

Referenced by NRLib::WriteBinaryShortArray().

◆ WriteUInt32BE()

void NRLib::NRLibPrivate::WriteUInt32BE ( char *  buffer,
unsigned int  ui 
)
inline

Write unsigned 32-bit integer to big-endian buffer.

References buffer, and masks.

Referenced by NRLib::WriteBinaryIntArray().

◆ WriteUInt32LE()

void NRLib::NRLibPrivate::WriteUInt32LE ( char *  buffer,
unsigned int  ui 
)
inline

Write unsigned 32-bit integer to little-endian buffer.

References buffer, and masks.

Referenced by NRLib::WriteBinaryIntArray().