Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
gnsstk::BinexData::MGFZI Class Reference

Detailed Description

A signed integer stored using 1, 2, 3, 4, 5, 6, 7, or 8 bytes to represent integers from about -1.15292e18 to +1.15292e18 using a modified version of a compression scheme developed by GFZ, plus using "special" numbers to flag certain conditions, such as using the 1-byte MFGZI to store "-0" to indicate "no value."

Definition at line 293 of file BinexData.hpp.

#include <BinexData.hpp>

Public Member Functions

size_t decode (const std::string &inBuffer, size_t offset=0, bool littleEndian=false)
 
size_t encode (std::string &outBuffer, size_t offset=0, bool littleEndian=false) const
 
size_t getSize () const
 
 MGFZI ()
 8 More...
 
 MGFZI (const MGFZI &other)
 
 MGFZI (long long ll)
 
 operator long long () const
 
bool operator!= (const MGFZI &other) const
 
bool operator< (const MGFZI &other) const
 
bool operator<= (const MGFZI &other) const
 
MGFZIoperator= (const MGFZI &right)
 
bool operator== (const MGFZI &other) const
 
bool operator> (const MGFZI &other) const
 
bool operator>= (const MGFZI &other) const
 
size_t read (std::istream &strm, std::string *outBuffer=NULL, size_t offset=0, bool reverseBytes=false, bool littleEndian=false)
 
size_t write (std::ostream &strm, std::string *outBuffer=NULL, size_t offset=0, bool reverseBytes=false, bool littleEndian=false) const
 

Static Public Attributes

static const GNSSTK_EXPORT unsigned char MAX_BYTES = 8
 1157442765409226759LL More...
 
static const GNSSTK_EXPORT long long MAX_VALUE = 1157442765409226759LL
 -1157442765409226759LL More...
 
static const GNSSTK_EXPORT long long MIN_VALUE = -1157442765409226759LL
 

Protected Attributes

size_t size
 
long long value
 

Constructor & Destructor Documentation

◆ MGFZI() [1/3]

gnsstk::BinexData::MGFZI::MGFZI ( )

8

Default constructor - sets value to 0.

Definition at line 373 of file BinexData.cpp.

◆ MGFZI() [2/3]

gnsstk::BinexData::MGFZI::MGFZI ( const MGFZI other)
inline

Copy constructor.

Definition at line 309 of file BinexData.hpp.

◆ MGFZI() [3/3]

gnsstk::BinexData::MGFZI::MGFZI ( long long  ll)

Constructor with a long long initialization value.

Exceptions
FFStreamError

Definition at line 381 of file BinexData.cpp.

Member Function Documentation

◆ decode()

size_t gnsstk::BinexData::MGFZI::decode ( const std::string &  inBuffer,
size_t  offset = 0,
bool  littleEndian = false 
)

Attempts to decode a valid MGFZI from the contents of inBuffer. The contents of inBuffer are assumed to be in normal order (i.e. not reversed) but may be either big or little endian.

Parameters
inBufferSequence of bytes to decode
offsetOffset into inBuffer at which to decode
littleEndianByte order of the encoded bytes
Returns
Number of bytes decoded
Exceptions
FFStreamError

Definition at line 433 of file BinexData.cpp.

◆ encode()

size_t gnsstk::BinexData::MGFZI::encode ( std::string &  outBuffer,
size_t  offset = 0,
bool  littleEndian = false 
) const

Converts the MGFZI to a series of bytes placed in outBuffer. The bytes are output in normal order (i.e. not reversed) but may encode in either big or little endian format.

Parameters
outBufferSequence of encoded bytes
offsetOffset into outBuffer at which to encode
littleEndianByte order of the encoded bytes
Returns
Number of bytes used to encode

Definition at line 619 of file BinexData.cpp.

◆ getSize()

size_t gnsstk::BinexData::MGFZI::getSize ( ) const
inline

Returns the number of bytes required to represent the MGFZI. A size of 0 indicates an invalid or uninitialized MGFZI.

Definition at line 399 of file BinexData.hpp.

◆ operator long long()

gnsstk::BinexData::MGFZI::operator long long ( ) const
inline

Returns the value of the MGFZI as a long long.

Definition at line 389 of file BinexData.hpp.

◆ operator!=()

bool gnsstk::BinexData::MGFZI::operator!= ( const MGFZI other) const
inline

Compares two MGFZI's for inequality.

Definition at line 344 of file BinexData.hpp.

◆ operator<()

bool gnsstk::BinexData::MGFZI::operator< ( const MGFZI other) const
inline

Returns whether this MGFZI is less than the other.

Definition at line 353 of file BinexData.hpp.

◆ operator<=()

bool gnsstk::BinexData::MGFZI::operator<= ( const MGFZI other) const
inline

Returns whether this MGFZI is less than or equal to the other.

Definition at line 362 of file BinexData.hpp.

◆ operator=()

MGFZI& gnsstk::BinexData::MGFZI::operator= ( const MGFZI right)
inline

Copies another MGFZI.

Definition at line 324 of file BinexData.hpp.

◆ operator==()

bool gnsstk::BinexData::MGFZI::operator== ( const MGFZI other) const
inline

Compares two MGFZI's for equality.

Definition at line 335 of file BinexData.hpp.

◆ operator>()

bool gnsstk::BinexData::MGFZI::operator> ( const MGFZI other) const
inline

Returns whether this MGFZI is greater than the other.

Definition at line 371 of file BinexData.hpp.

◆ operator>=()

bool gnsstk::BinexData::MGFZI::operator>= ( const MGFZI other) const
inline

Returns whether this MGFZI is greater than or equal to the other.

Definition at line 380 of file BinexData.hpp.

◆ read()

size_t gnsstk::BinexData::MGFZI::read ( std::istream &  strm,
std::string *  outBuffer = NULL,
size_t  offset = 0,
bool  reverseBytes = false,
bool  littleEndian = false 
)

Attempts to read a valid MGFZI from the specified input stream. The stream can be in reverse order and can be big or little endian. If the method succeeds, the number of bytes used to construct the MGFZI can be determined by calling the getSize() method.

Parameters
strmStream from which to read
outBufferOptional buffer to receive copy of raw input
reverseBytesOptional flag indicating whether the input bytes are reversed
littleEndianOptional flag indicating byte order of input
Exceptions
FFStreamError

Definition at line 807 of file BinexData.cpp.

◆ write()

size_t gnsstk::BinexData::MGFZI::write ( std::ostream &  strm,
std::string *  outBuffer = NULL,
size_t  offset = 0,
bool  reverseBytes = false,
bool  littleEndian = false 
) const

Attempts to write the MGFZI to the specified output stream. The stream can be output in reverse order and can be big or little endian. The method fails if the entire MGFZI cannot be written to the stream.

Parameters
strmStream in which to write
outBufferOptional buffer to receive copy of raw output
reverseBytesOptional flag indicating whether the output bytes should be reversed
littleEndianOptional flag indicating byte order of output
Exceptions
FFStreamError

Definition at line 869 of file BinexData.cpp.

Member Data Documentation

◆ MAX_BYTES

const unsigned char gnsstk::BinexData::MGFZI::MAX_BYTES = 8
static

1157442765409226759LL

Definition at line 299 of file BinexData.hpp.

◆ MAX_VALUE

const long long gnsstk::BinexData::MGFZI::MAX_VALUE = 1157442765409226759LL
static

-1157442765409226759LL

Definition at line 298 of file BinexData.hpp.

◆ MIN_VALUE

const long long gnsstk::BinexData::MGFZI::MIN_VALUE = -1157442765409226759LL
static

Definition at line 297 of file BinexData.hpp.

◆ size

size_t gnsstk::BinexData::MGFZI::size
protected

Definition at line 475 of file BinexData.hpp.

◆ value

long long gnsstk::BinexData::MGFZI::value
protected

Definition at line 474 of file BinexData.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:44