15 #ifndef STREAMREADER_H
16 #define STREAMREADER_H
18 #include "dtoolbase.h"
20 #include "numeric_types.h"
21 #include "littleEndian.h"
22 #include "bigEndian.h"
34 INLINE StreamReader(istream *in,
bool owns_stream);
35 INLINE StreamReader(
const StreamReader ©);
36 INLINE
void operator = (
const StreamReader ©);
37 INLINE ~StreamReader();
39 INLINE istream *get_istream()
const;
41 BLOCKING INLINE
bool get_bool();
42 BLOCKING INLINE PN_int8 get_int8();
43 BLOCKING INLINE PN_uint8 get_uint8();
45 BLOCKING INLINE PN_int16 get_int16();
46 BLOCKING INLINE PN_int32 get_int32();
47 BLOCKING INLINE PN_int64 get_int64();
48 BLOCKING INLINE PN_uint16 get_uint16();
49 BLOCKING INLINE PN_uint32 get_uint32();
50 BLOCKING INLINE PN_uint64 get_uint64();
51 BLOCKING INLINE
float get_float32();
52 BLOCKING INLINE PN_float64 get_float64();
54 BLOCKING INLINE PN_int16 get_be_int16();
55 BLOCKING INLINE PN_int32 get_be_int32();
56 BLOCKING INLINE PN_int64 get_be_int64();
57 BLOCKING INLINE PN_uint16 get_be_uint16();
58 BLOCKING INLINE PN_uint32 get_be_uint32();
59 BLOCKING INLINE PN_uint64 get_be_uint64();
60 BLOCKING INLINE
float get_be_float32();
61 BLOCKING INLINE PN_float64 get_be_float64();
63 BLOCKING
string get_string();
64 BLOCKING
string get_string32();
65 BLOCKING
string get_z_string();
66 BLOCKING
string get_fixed_string(
size_t size);
68 BLOCKING
void skip_bytes(
size_t size);
69 BLOCKING
string extract_bytes(
size_t size);
70 BLOCKING
size_t extract_bytes(
unsigned char *into,
size_t size);
72 BLOCKING
string readline();
73 EXTENSION(BLOCKING PyObject *readlines());
80 #include "streamReader.I"
A class to read sequential binary data directly from an istream.