vul_redirector Class Reference

#include <vul_redirector.h>

List of all members.


Detailed Description

Simplified redirection of iostreams.

To implement your own, derive a class from vul_redirector, and implement `putchunk'.

Definition at line 26 of file vul_redirector.h.


Public Member Functions

 vul_redirector (vcl_ostream &s)
 Attach redirector to vcl_ostream s, so that all future output to s goes through this->putchunk.
virtual ~vul_redirector ()
 Destroy redirector, restore stream to original.
virtual vcl_streamsize putchunk (char const *buf, vcl_streamsize n)
 The filter function.

Protected Member Functions

vcl_streamsize put_passthru (char const *buf, vcl_streamsize n)
 Put characters to original stream.
int sync_passthru ()
 Sync original stream.

Private Attributes

vul_redirector_datap

Constructor & Destructor Documentation

vul_redirector::vul_redirector ( vcl_ostream &  s  ) 

Attach redirector to vcl_ostream s, so that all future output to s goes through this->putchunk.

Definition at line 97 of file vul_redirector.cxx.

vul_redirector::~vul_redirector (  )  [virtual]

Destroy redirector, restore stream to original.

Definition at line 112 of file vul_redirector.cxx.


Member Function Documentation

vcl_streamsize vul_redirector::putchunk ( char const *  buf,
vcl_streamsize  n 
) [virtual]

The filter function.

Called with `n' characters in `buf', do with as you like.

Definition at line 146 of file vul_redirector.cxx.

vcl_streamsize vul_redirector::put_passthru ( char const *  buf,
vcl_streamsize  n 
) [protected]

Put characters to original stream.

Useful for derived classes which wish to filter a stream.

Definition at line 140 of file vul_redirector.cxx.

int vul_redirector::sync_passthru (  )  [protected]

Sync original stream.

Definition at line 125 of file vul_redirector.cxx.


Member Data Documentation

vul_redirector_data* vul_redirector::p [private]

Definition at line 48 of file vul_redirector.h.


The documentation for this class was generated from the following files:
Generated on Mon Mar 8 05:09:58 2010 for core/vul by  doxygen 1.5.1