base::Streams Class Reference

Threaded streams. More...

#include <base_stream.hh>

Inheritance diagram for base::Streams:

base::Threadable

List of all members.

Public Member Functions

 Streams (void)
 ~Streams ()
void Open (void)
void Close (void)
void SetErrorLogFname (const string &fname)

Public Attributes

SafePtr< ostream > mOut
SafePtr< ostream > mError
SafePtr< ostream > mDebug

Private Attributes

string mErrorLogFname
FILE * mErrorLogFile


Detailed Description

Threaded streams.

Although Streams is thread-safe, threads that concurrently write to a stream diverted to stdout/stderr will result in intermixed output. The responsibility of serializing output is deferred to a client which would need to lock every stream statement.

Thread::Run() opens per-thread streams.


Constructor & Destructor Documentation

base::Streams::Streams ( void   ) 

ctor/dtor.

base::Streams::~Streams (  ) 


Member Function Documentation

void base::Streams::Open ( void   ) 

Open/close streams for current thread. Thread::Run() calls these.

void base::Streams::Close ( void   ) 

void base::Streams::SetErrorLogFname ( const string &  fname  )  [inline]


Member Data Documentation

SafePtr<ostream> base::Streams::mOut

SafePtr<ostream> base::Streams::mError

SafePtr<ostream> base::Streams::mDebug

string base::Streams::mErrorLogFname [private]

FILE* base::Streams::mErrorLogFile [private]


The documentation for this class was generated from the following files: Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:19 2007