14#ifndef STRINGSTREAMBUF_H
15#define STRINGSTREAMBUF_H
25class EXPCL_PANDA_DOWNLOADER StringStreamBuf :
public std::streambuf {
28 virtual ~StringStreamBuf();
32 INLINE
void swap_data(vector_uchar &data);
33 INLINE
const vector_uchar &
get_data()
const;
39 virtual std::streampos seekoff(std::streamoff off, ios_seekdir dir, ios_openmode which);
40 virtual std::streampos seekpos(std::streampos pos, ios_openmode which);
42 virtual int overflow(
int c);
44 virtual int underflow();
void write_chars(const char *start, size_t length)
Appends the indicated stream of characters to the current file position.
const vector_uchar & get_data() const
Returns a reference to the contents of the internal buffer, without any of the iostream buffer.
void clear()
Empties the buffer.
size_t read_chars(char *start, size_t length)
Attempts to extract the indicated number of characters from the current file position.
void swap_data(vector_uchar &data)
Swaps the indicated buffer for the contents of the internal buffer.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.