29class EXPCL_DTOOL_PRC StreamWriter {
31 INLINE StreamWriter(std::ostream &out);
33 INLINE
explicit StreamWriter(std::ostream *out,
bool owns_stream);
34 INLINE StreamWriter(
const StreamWriter ©);
35 INLINE
void operator = (
const StreamWriter ©);
36 INLINE ~StreamWriter();
41 BLOCKING INLINE
void add_bool(
bool value);
42 BLOCKING INLINE
void add_int8(int8_t value);
43 BLOCKING INLINE
void add_uint8(uint8_t value);
46 BLOCKING INLINE
void add_int16(int16_t value);
47 BLOCKING INLINE
void add_int32(int32_t value);
48 BLOCKING INLINE
void add_int64(int64_t value);
49 BLOCKING INLINE
void add_uint16(uint16_t value);
50 BLOCKING INLINE
void add_uint32(uint32_t value);
51 BLOCKING INLINE
void add_uint64(uint64_t value);
65 BLOCKING INLINE
void add_string(
const std::string &str);
66 BLOCKING INLINE
void add_string32(
const std::string &str);
73 BLOCKING INLINE
void flush();
75 BLOCKING INLINE
void write(
const std::string &str);
78 BLOCKING INLINE
void append_data(
const void *data,
size_t size);
79 BLOCKING INLINE
void append_data(
const std::string &data);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void append_data(const void *data, size_t size)
Appends some more raw data to the end of the streamWriter.
void write(const std::string &str)
A synonym of append_data().
void add_string32(const std::string &str)
Adds a variable-length string to the stream, using a 32-bit length field.
void flush()
Calls flush() on the underlying stream.
void add_float64(PN_float64 value)
Adds a 64-bit floating-point number to the stream.
void add_be_uint32(uint32_t value)
Adds an unsigned 32-bit big-endian integer to the streamWriter.
void pad_bytes(size_t size)
Adds the indicated number of zero bytes to the stream.
void add_int32(int32_t value)
Adds a signed 32-bit integer to the stream.
void add_be_int32(int32_t value)
Adds a signed 32-bit big-endian integer to the streamWriter.
void add_be_float32(float value)
Adds a 32-bit single-precision big-endian floating-point number to the stream.
void add_float32(float value)
Adds a 32-bit single-precision floating-point number to the stream.
void add_uint8(uint8_t value)
Adds an unsigned 8-bit integer to the stream.
void add_be_int64(int64_t value)
Adds a signed 64-bit big-endian integer to the streamWriter.
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the stream.
void add_int64(int64_t value)
Adds a signed 64-bit integer to the stream.
void add_z_string(std::string str)
Adds a variable-length string to the stream, as a NULL-terminated string.
void add_fixed_string(const std::string &str, size_t size)
Adds a fixed-length string to the stream.
void add_uint32(uint32_t value)
Adds an unsigned 32-bit integer to the stream.
void add_int16(int16_t value)
Adds a signed 16-bit integer to the stream.
void add_be_uint64(uint64_t value)
Adds an unsigned 64-bit big-endian integer to the streamWriter.
void add_be_int16(int16_t value)
Adds a signed 16-bit big-endian integer to the streamWriter.
void add_be_float64(PN_float64 value)
Adds a 64-bit big-endian floating-point number to the streamWriter.
void add_be_uint16(uint16_t value)
Adds an unsigned 16-bit big-endian integer to the streamWriter.
void add_int8(int8_t value)
Adds a signed 8-bit integer to the stream.
void add_uint64(uint64_t value)
Adds an unsigned 64-bit integer to the stream.
void add_bool(bool value)
Adds a boolean value to the stream.
get_ostream
Returns the stream in use.
void add_string(const std::string &str)
Adds a variable-length string to the stream.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.