22class EXPCL_DIRECT_DCPARSER DCPackData {
30 INLINE
void append_data(
const char *buffer,
size_t size);
33 INLINE
void rewrite_data(
size_t position,
const char *buffer,
size_t size);
44 void set_used_length(
size_t size);
48 size_t _allocated_size;
const char * get_data() const
Returns the beginning of the data buffer.
char * take_data()
Returns the pointer to the beginning of the data buffer, and transfers ownership of the buffer to the...
char * get_rewrite_pointer(size_t position, size_t size)
Returns a pointer into the middle of the data at the indicated point.
void append_junk(size_t size)
Adds some uninitialized bytes to the end of the data.
void append_data(const char *buffer, size_t size)
Adds the indicated bytes to the end of the data.
size_t get_length() const
Returns the current length of the buffer.
void rewrite_data(size_t position, const char *buffer, size_t size)
Changes the data at the indicated position to the given value.
void clear()
Empties the contents of the data (without necessarily freeing its allocated memory).
std::string get_string() const
Returns the data buffer as a string.
char * get_write_pointer(size_t size)
Adds the indicated number of bytes to the end of the data without initializing them,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.