Go to the documentation of this file.
44 #ifndef GNSSTK_FFBINARYSTREAM_HPP
45 #define GNSSTK_FFBINARYSTREAM_HPP
75 std::ios::openmode mode=std::ios::in|std::ios::binary);
78 virtual void open(
const char*
fn, std::ios::openmode mode);
87 inline void getData(uint8_t& v);
88 inline void getData(uint16_t& v);
89 inline void getData(uint32_t& v);
90 inline void getData(uint64_t& v);
92 inline void getData(int16_t& v);
93 inline void getData(int32_t& v);
94 inline void getData(int64_t& v);
104 void getData(
char* buff,
size_t length);
124 void writeData(
const char* buff,
size_t length);
139 #define FFBIN_GET_DATA(ITOH_FN,NTOH_FN) \
140 char buf[sizeof(v)] = ""; \
141 getData(buf, sizeof(v)); \
142 if (isStreamLittleEndian()) \
143 BinUtils::ITOH_FN(buf, v); \
145 BinUtils::NTOH_FN(buf, v);
147 #define FFBIN_WRITE_DATA(HTOI_FN,HTON_FN) \
148 char buf[sizeof(v)]; \
149 if (isStreamLittleEndian()) \
150 BinUtils::HTOI_FN(buf, v); \
152 BinUtils::HTON_FN(buf, v); \
153 writeData(buf, sizeof(v));
158 char *buf =
reinterpret_cast<char*
>(&v);
179 char *buf =
reinterpret_cast<char*
>(&v);
211 char *buf =
reinterpret_cast<char*
>(&v);
232 char *buf =
reinterpret_cast<char*
>(&v);
void buitohsl(const void *p, int32_t &v, unsigned pos=0)
void buitohs(const void *p, uint16_t &v, unsigned pos=0)
virtual void open(const char *fn, std::ios::openmode mode)
Overrides open to ensure binary mode opens.
void buntohsll(const void *p, int64_t &v, unsigned pos=0)
void buntohd(const void *p, double &v, unsigned pos=0)
void buhtonl(void *p, uint32_t v, unsigned pos=0)
void buhtoid(void *p, double v, unsigned pos=0)
void buhtoiss(void *p, int16_t v, unsigned pos=0)
void buhtond(void *p, double v, unsigned pos=0)
void buhtonll(void *p, uint64_t v, unsigned pos=0)
void buitohss(const void *p, int16_t &v, unsigned pos=0)
void buhtonss(void *p, int16_t v, unsigned pos=0)
void buntohl(const void *p, uint32_t &v, unsigned pos=0)
void buhtonsl(void *p, int32_t v, unsigned pos=0)
void buntohss(const void *p, int16_t &v, unsigned pos=0)
void buitohsll(const void *p, int64_t &v, unsigned pos=0)
#define FFBIN_GET_DATA(ITOH_FN, NTOH_FN)
void buhtois(void *p, uint16_t v, unsigned pos=0)
void buntohll(const void *p, uint64_t &v, unsigned pos=0)
FFBinaryStream()
Default constructor.
void buhtoil(void *p, uint32_t v, unsigned pos=0)
void buntohf(const void *p, float &v, unsigned pos=0)
void buntohs(const void *p, uint16_t &v, unsigned pos=0)
void buitohl(const void *p, uint32_t &v, unsigned pos=0)
void buitohf(const void *p, float &v, unsigned pos=0)
void buitohd(const void *p, double &v, unsigned pos=0)
void buhtoill(void *p, uint64_t v, unsigned pos=0)
void buhtonsll(void *p, int64_t v, unsigned pos=0)
void buhtoisll(void *p, int64_t v, unsigned pos=0)
#define FFBIN_WRITE_DATA(HTOI_FN, HTON_FN)
void buntohsl(const void *p, int32_t &v, unsigned pos=0)
void buhtonf(void *p, float v, unsigned pos=0)
void buitohll(const void *p, uint64_t &v, unsigned pos=0)
void buhtoif(void *p, float v, unsigned pos=0)
virtual ~FFBinaryStream()
destructor
void buhtoisl(void *p, int32_t v, unsigned pos=0)
void writeData(uint8_t v)
void buhtons(void *p, uint16_t v, unsigned pos=0)
virtual bool isStreamLittleEndian() const noexcept=0
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39