Panda3D
Public Types | Public Member Functions

MultiplexStream Class Reference

This is a special ostream that forwards the data that is written to it to any number of other sources, for instance other ostreams, or explicitly to a disk file or to system logging utilities. More...

Inheritance diagram for MultiplexStream:
ostream ios ios_base

List of all members.

Public Types

enum  openmode
enum  seekdir { beg = 0, cur = 1, end = 2 }

Public Member Functions

 MultiplexStream ()
bool addFile (Filename file)
 Adds the given file to the multiplex output.
 addOstream (ostream out, bool delete_later)
 Adds the indicated generic ostream to the multiplex output.
 addOstream (ostream out)
 Adds the indicated generic ostream to the multiplex output.
 addStandardOutput ()
 Adds the standard output channel.
bool addStdioFile (FILE file, bool close_when_done)
 Adds the given file, previously opened using the C stdio library, to the multiplex output.
 addSystemDebug ()
 Adds the system debug output the the multiplex output.
bool bad ()
 clear ()
bool eof ()
bool fail ()
 flush ()
 Forces out all output that hasn't yet been written.
bool good ()
 put (char c)
 seekp (unsigned long int pos)
 seekp (long int off, seekdir dir)
unsigned long int tellp ()

Detailed Description

This is a special ostream that forwards the data that is written to it to any number of other sources, for instance other ostreams, or explicitly to a disk file or to system logging utilities.

It's a very handy thing to set Notify to refer to when running in batch mode.


Member Enumeration Documentation

enum openmode [inherited]
enum seekdir [inherited]
Enumerator:
beg 
cur 
end 

Constructor & Destructor Documentation


Member Function Documentation

bool addFile ( Filename  file)

Adds the given file to the multiplex output.

The file is opened in append mode with line buffering. Returns false if the file cannot be opened.

addOstream ( ostream  out,
bool  delete_later 
)

Adds the indicated generic ostream to the multiplex output.

The ostream will receive whatever data is sent to the pipe.

addOstream ( ostream  out)

Adds the indicated generic ostream to the multiplex output.

The ostream will receive whatever data is sent to the pipe.

addStandardOutput ( )

Adds the standard output channel.

bool addStdioFile ( FILE  file,
bool  close_when_done 
)

Adds the given file, previously opened using the C stdio library, to the multiplex output.

addSystemDebug ( )

Adds the system debug output the the multiplex output.

This may map to a syslog or some such os-specific output system. It may do nothing on a particular system.

Presently, this maps only to OutputDebugString() on Windows.

bool bad ( ) [inherited]
clear ( ) [inherited]
bool eof ( ) [inherited]
bool fail ( ) [inherited]
flush ( )

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

Reimplemented from ostream.

bool good ( ) [inherited]
put ( char  c) [inherited]
seekp ( long int  off,
seekdir  dir 
) [inherited]
seekp ( unsigned long int  pos) [inherited]
unsigned long int tellp ( ) [inherited]
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties