15 #ifndef STREAMWRITER_H 16 #define STREAMWRITER_H 18 #include "dtoolbase.h" 20 #include "numeric_types.h" 21 #include "littleEndian.h" 22 #include "bigEndian.h" 37 INLINE StreamWriter(ostream *out,
bool owns_stream);
38 INLINE StreamWriter(
const StreamWriter ©);
39 INLINE
void operator = (
const StreamWriter ©);
40 INLINE ~StreamWriter();
42 INLINE ostream *get_ostream()
const;
44 BLOCKING INLINE
void add_bool(
bool value);
45 BLOCKING INLINE
void add_int8(PN_int8 value);
46 BLOCKING INLINE
void add_uint8(PN_uint8 value);
49 BLOCKING INLINE
void add_int16(PN_int16 value);
50 BLOCKING INLINE
void add_int32(PN_int32 value);
51 BLOCKING INLINE
void add_int64(PN_int64 value);
52 BLOCKING INLINE
void add_uint16(PN_uint16 value);
53 BLOCKING INLINE
void add_uint32(PN_uint32 value);
54 BLOCKING INLINE
void add_uint64(PN_uint64 value);
55 BLOCKING INLINE
void add_float32(
float value);
56 BLOCKING INLINE
void add_float64(PN_float64 value);
59 BLOCKING INLINE
void add_be_int16(PN_int16 value);
60 BLOCKING INLINE
void add_be_int32(PN_int32 value);
61 BLOCKING INLINE
void add_be_int64(PN_int64 value);
62 BLOCKING INLINE
void add_be_uint16(PN_uint16 value);
63 BLOCKING INLINE
void add_be_uint32(PN_uint32 value);
64 BLOCKING INLINE
void add_be_uint64(PN_uint64 value);
65 BLOCKING INLINE
void add_be_float32(
float value);
66 BLOCKING INLINE
void add_be_float64(PN_float64 value);
68 BLOCKING INLINE
void add_string(
const string &str);
69 BLOCKING INLINE
void add_string32(
const string &str);
70 BLOCKING INLINE
void add_z_string(
string str);
71 BLOCKING INLINE
void add_fixed_string(
const string &str,
size_t size);
73 BLOCKING
void pad_bytes(
size_t size);
74 BLOCKING INLINE
void append_data(
const void *data,
size_t size);
75 BLOCKING INLINE
void append_data(
const string &data);
77 BLOCKING INLINE
void flush();
79 BLOCKING INLINE
void write(
const string &str);
86 #include "streamWriter.I" A StreamWriter object is used to write sequential binary data directly to an ostream.