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 |
MGFZI & | operator= (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 |
gnsstk::BinexData::MGFZI::MGFZI | ( | ) |
Copy constructor.
Definition at line 309 of file BinexData.hpp.
gnsstk::BinexData::MGFZI::MGFZI | ( | long long | ll | ) |
Constructor with a long long initialization value.
FFStreamError |
Definition at line 381 of file BinexData.cpp.
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.
inBuffer | Sequence of bytes to decode |
offset | Offset into inBuffer at which to decode |
littleEndian | Byte order of the encoded bytes |
FFStreamError |
Definition at line 433 of file BinexData.cpp.
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.
outBuffer | Sequence of encoded bytes |
offset | Offset into outBuffer at which to encode |
littleEndian | Byte order of the encoded bytes |
Definition at line 619 of file BinexData.cpp.
|
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.
|
inline |
Returns the value of the MGFZI as a long long.
Definition at line 389 of file BinexData.hpp.
Compares two MGFZI's for inequality.
Definition at line 344 of file BinexData.hpp.
Returns whether this MGFZI is less than the other.
Definition at line 353 of file BinexData.hpp.
Returns whether this MGFZI is less than or equal to the other.
Definition at line 362 of file BinexData.hpp.
Copies another MGFZI.
Definition at line 324 of file BinexData.hpp.
Compares two MGFZI's for equality.
Definition at line 335 of file BinexData.hpp.
Returns whether this MGFZI is greater than the other.
Definition at line 371 of file BinexData.hpp.
Returns whether this MGFZI is greater than or equal to the other.
Definition at line 380 of file BinexData.hpp.
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.
strm | Stream from which to read |
outBuffer | Optional buffer to receive copy of raw input |
reverseBytes | Optional flag indicating whether the input bytes are reversed |
littleEndian | Optional flag indicating byte order of input |
FFStreamError |
Definition at line 807 of file BinexData.cpp.
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.
strm | Stream in which to write |
outBuffer | Optional buffer to receive copy of raw output |
reverseBytes | Optional flag indicating whether the output bytes should be reversed |
littleEndian | Optional flag indicating byte order of output |
FFStreamError |
Definition at line 869 of file BinexData.cpp.
|
static |
1157442765409226759LL
Definition at line 299 of file BinexData.hpp.
|
static |
-1157442765409226759LL
Definition at line 298 of file BinexData.hpp.
|
static |
Definition at line 297 of file BinexData.hpp.
|
protected |
Definition at line 475 of file BinexData.hpp.
|
protected |
Definition at line 474 of file BinexData.hpp.