17INLINE MultiplexStream::
19 setf(std::ios::unitbuf);
28 _msb.add_output(MultiplexStreamBuf::BT_none,
29 MultiplexStreamBuf::OT_ostream,
30 out,
nullptr, delete_later);
39 _msb.add_output(MultiplexStreamBuf::BT_line,
40 MultiplexStreamBuf::OT_stdio,
41 nullptr, fout, close_when_done);
50 _msb.add_output(MultiplexStreamBuf::BT_none,
51 MultiplexStreamBuf::OT_ostream,
52 &std::cout,
nullptr,
false);
62 pofstream *out =
new pofstream;
67 out->setf(std::ios::unitbuf);
69 _msb.add_output(MultiplexStreamBuf::BT_line,
70 MultiplexStreamBuf::OT_ostream,
84 _msb.add_output(MultiplexStreamBuf::BT_line,
85 MultiplexStreamBuf::OT_system_debug);
The name of a file, such as a texture file or an Egg file.
bool open_append(std::ofstream &stream) const
Opens the indicated ofstream for writing the file, if possible.
void set_text()
Indicates that the filename represents a text file.
void flush()
Forces out all output that hasn't yet been written.
bool add_stdio_file(FILE *file, bool close_when_done)
Adds the given file, previously opened using the C stdio library, to the multiplex output.
void add_standard_output()
Adds the standard output channel.
void add_system_debug()
Adds the system debug output the the multiplex output.
void add_ostream(std::ostream *out, bool delete_later=false)
Adds the indicated generic ostream to the multiplex output.
bool add_file(Filename file)
Adds the given file to the multiplex output.