This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
a question about inheriting from std::iostream
- From: ritesh parmar <parmarp at charter dot net>
- To: gcc help mailing list <gcc-help at gcc dot gnu dot org>
- Date: Mon, 30 Aug 2004 23:39:35 -0400
- Subject: a question about inheriting from std::iostream
I'm not sure if this question has been asked and i couldn't find an
example in all of my searches. But I'd like to write a class that would
perform substitution of keywords while some other class is reading from
it.
I was thinking about getting streambuf from ios::rdbuf() and
performing all the substitutions and then setting it back but that
approach make take some time with big files. If my understanding is
correct about how streambuf class works.
Can anybody suggest a way of inheriting from iostream and doing the
substitution on-the-fly ?