TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Greg Newton
from: David Nugent
date: 1995-04-26 17:01:32
subject: C++ Streams as Filters?

> DN> streambuf provides you byte-level access to the stream, direct access
 > DN> to the buffers themselves - everything you want. Don't worry about
 > DN> fiddling with ostreams, since that's the wrong place to do what you
 > DN> want to do.

 > I think I get it a bit better this time.

 > I derive a class from streambuf to do any modifications on
 > the stream, then use ostream_withassign to get to use all the
 > standard output methods on my mangled stream.


That's basically it. istream/ostream/iostream simply contains insertion and
extraction methods, but the guts of I/O operations is all in the streambuf
lattice.

It just *looks* cumbersome, but it isn't. The structure is surprisingly elegant.

---
* Origin: Unique Computing, Melbourne, Australia (3:632/348)
SEEN-BY: 50/99 620/243 623/630 632/103 348 998 633/371 379 634/384 388
SEEN-BY: 635/301 502 503 541 544 727 636/100 639/100 711/401 409 410 430 510
SEEN-BY: 711/807 808 809 932 934 712/515 713/888 714/906 800/1 7877/2809
@PATH: 632/103 348 635/503 50/99 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.