Panda3D
Classes | Public Types | Public Member Functions | Protected Member Functions
MultiplexStreamBuf Class Reference

Used by MultiplexStream to implement an ostream that sends what is written to it to any number of additional sources, like other ostreams. More...

#include "multiplexStreamBuf.h"

List of all members.

Classes

class  Output

Public Types

enum  BufferType { BT_none, BT_line }
enum  OutputType { OT_ostream, OT_stdio, OT_system_debug }

Public Member Functions

void add_output (BufferType buffer_type, OutputType output_type, ostream *out=(ostream *) NULL, FILE *fout=(FILE *) NULL, bool owns_obj=false)
 Adds the indicated output destinition to the set of things that will be written to when characters are output to the MultiplexStream.
void flush ()
 Forces out all output that hasn't yet been written.

Protected Member Functions

virtual int overflow (int c)
 Called by the system ostream implementation when its internal buffer is filled, plus one character.
virtual int sync ()
 Called by the system ostream implementation when the buffer should be flushed to output (for instance, on destruction).

Detailed Description

Used by MultiplexStream to implement an ostream that sends what is written to it to any number of additional sources, like other ostreams.

Definition at line 29 of file multiplexStreamBuf.h.


Member Function Documentation

void MultiplexStreamBuf::add_output ( MultiplexStreamBuf::BufferType  buffer_type,
MultiplexStreamBuf::OutputType  output_type,
ostream *  out = (ostream *)NULL,
FILE *  fout = (FILE *)NULL,
bool  owns_obj = false 
)

Adds the indicated output destinition to the set of things that will be written to when characters are output to the MultiplexStream.

Definition at line 126 of file multiplexStreamBuf.cxx.

Referenced by MultiplexStream::add_file(), MultiplexStream::add_ostream(), MultiplexStream::add_standard_output(), MultiplexStream::add_stdio_file(), and MultiplexStream::add_system_debug().

void MultiplexStreamBuf::flush ( void  )

Forces out all output that hasn't yet been written.

Definition at line 151 of file multiplexStreamBuf.cxx.

Referenced by MultiplexStream::flush().

int MultiplexStreamBuf::overflow ( int  c) [protected, virtual]

Called by the system ostream implementation when its internal buffer is filled, plus one character.

Definition at line 166 of file multiplexStreamBuf.cxx.

int MultiplexStreamBuf::sync ( void  ) [protected, virtual]

Called by the system ostream implementation when the buffer should be flushed to output (for instance, on destruction).

Definition at line 195 of file multiplexStreamBuf.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations