4 #include "../application/global.h"
5 #include "../conversion/types.h"
6 #include "../conversion/binaryconversion.h"
23 const std::istream *stream()
const;
24 std::istream *stream();
25 void setStream(std::istream *stream,
bool giveOwnership =
false);
26 bool hasOwnership()
const;
28 void detatchOwnership();
34 std::istream::pos_type readStreamsize();
35 void read(
char *buffer, std::streamsize length);
36 void read(
byte *buffer, std::streamsize length);
37 void read(std::vector<char> &buffer, std::streamsize length);
46 float32 readFloat32();
47 float64 readFloat64();
51 std::string readLengthPrefixedString();
52 std::string readString(
size_t length);
53 std::string readTerminatedString(
byte termination = 0);
54 std::string readTerminatedString(
size_t maxBytesToRead,
byte termination = 0);
55 std::string readMultibyteTerminatedString(
uint16 termination = 0);
56 std::string readMultibyteTerminatedString(
size_t maxBytesToRead,
uint16 termination = 0);
57 uint32 readSynchsafeUInt32();
58 uint32 readCrc32(
size_t length);
59 static uint32 *crc32Table();
62 std::istream *m_stream;
64 std::istream::pos_type m_streamsize;
70 #endif // BINERYREADER_H
ByteOrder
Specifies the byte order/endianness.
std::int64_t int64
signed 64-bit integer
Reads primitive data types from a std::istream using a specified ConversionUtilities::ByteOrder.
#define LIB_EXPORT
This macro marks a symbol for shared library export.
std::uint64_t uint64
unsigned 64-bit integer
Contains utility classes helping to read and write streams.
std::uint32_t uint32
unsigned 32-bit integer
std::int32_t int32
signed 32-bit integer
std::uint8_t byte
unsigned byte
std::int16_t int16
signed 16-bit integer
std::uint16_t uint16
unsigned 16-bit integer