14#ifndef MULTIPLEXSTREAMBUF_H
15#define MULTIPLEXSTREAMBUF_H
27class EXPCL_PANDA_DOWNLOADER MultiplexStreamBuf :
public std::streambuf {
30 virtual ~MultiplexStreamBuf();
43 void add_output(BufferType buffer_type, OutputType output_type,
44 std::ostream *out =
nullptr,
46 bool owns_obj =
false);
51 virtual int overflow(
int c);
55 void write_chars(
const char *start,
int length,
bool flush);
61 void write_string(
const std::string &str);
63 BufferType _buffer_type;
64 OutputType _output_type;
70 typedef pvector<Output> Outputs;
74 std::string _line_buffer;
void flush()
Forces out all output that hasn't yet been written.
void add_output(BufferType buffer_type, OutputType output_type, std::ostream *out=nullptr, FILE *fout=nullptr, bool owns_obj=false)
Adds the indicated output destinition to the set of things that will be written to when characters ar...
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.