I am very sorry if this is a FAQ but I have checked the FAQ for this NG
(http://www.plethora.net/%7Eseebs/faqs/clcm.html) and Google ad nauseum but
have not found the information I'm seeking:
{Please note that the above is NOT the FAQ for this newsgroup, but one
for C. -mod/fwg}
I am using an existing third-party class that uses ostream objects to stream its
output. I am expected to pass the ostream object (from ostream.h, not
STL::<ostream>) to which this class will write. But I would like the data written
to this ostream object to be handled by my own code (so I can send it out a
COM IStream interface, if you're interested), not the code from the ostream
implementation in the C/C++ compiler libraries. What is the best way to do
this? I can tell all the specifics if you want.
Thank you, Luke Luck (Vic)
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
0
|
|
|
|
Reply
|
Luke
|
8/29/2003 11:07:45 AM |
|
Luke Luck wrote:
> I am very sorry if this is a FAQ but I have checked the FAQ for this
> NG (http://www.plethora.net/%7Eseebs/faqs/clcm.html) and Google ad
> nauseum but
> have not found the information I'm seeking:
>
> {Please note that the above is NOT the FAQ for this newsgroup, but one
> for C. -mod/fwg}
>
> I am using an existing third-party class that uses ostream objects to
> stream its output. I am expected to pass the ostream object (from
> ostream.h, not STL::<ostream>) to which this class will write. But I
> would like the data written to this ostream object to be handled by
> my own code (so I can send it out a
> COM IStream interface, if you're interested), not the code from the
> ostream implementation in the C/C++ compiler libraries. What is the
> best way to do
> this? I can tell all the specifics if you want.
You will need to write a custom stream buffer. This page seems to be a good
start: http://ript.net/~spec/streams/
--
Attila aka WW
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
0
|
|
|
|
Reply
|
Attila
|
8/29/2003 3:44:38 PM
|
|