This page contains an example for defining and using a specialized
streambuf class.
- filterstreambuf.h defines
the class
FilterStreambuf
which simply delegates
all I/O to an underlying Filter
object.
- teestream.h and
teestream.C define a
TeeStream
class which uses a
FilterStreambuf
to redirect output to several
streams in parallel (compare with the unix tee
command).
- The file tteestream.C contains
an example program using
TeeStream
.
All source files, including a
Makefile are available
in the tarball chapter-10.tar.gz.
Dirk Vermeir
(dvermeir@vub.ac.be)
[Last modified:
Thu Jul 5 12:30:30 CEST 2001
]