Hi Manu!
I went back into the vault and found that STD_FILES actually used to use
IO_MEDIUM.
In fact, I had made use of that to define a new class BUFFER_MEDIUM to
support redirection of print statements for a macro facility feedback
mechanism. It worked quite nicely as I recall. I had my own version of
STD_FILEs that simply redefined a few things from the standard one and
excluded the original from my Ace file.
I guess is safe to assume that won't work anymore :)
R
==================================================
Roger F. Osmond
----------------------------------------
Amalasoft Corporation
273 Harwood Avenue
Littleton, MA 01460
> -------- Original Message --------
> Subject: RE: [eiffel_software] Redirecting standard file output to a
> string.
> From: "Emmanuel Stapf [ES]" <
manus@...>
> Date: Wed, July 23, 2008 6:37 pm
> To: <
eiffel_software@...>
> > I was wondering why STD_FILES uses PLAIN_TEXT_FILE for input, output
> > and error, rather than IO_MEDIUM.
> Actually I'm not sure why. Most likely the plain text nature of the output has to
> do with this. There are some features such as `flush' and `read_word' which are
> useful but not present in IO_MEDIUM.
>
> > The reason I ask, is that doing so makes it difficult (and time
> > consuming) to redirect the output to a string. I found myself having to
> > create an ugly descendant of PLAIN_TEXT_FILE, which wrote to a string
> > instead of using the C file-output functions. It would have been more
> > elegant and quicker had IO_MEDIUM been the base class.
> Make sense.
>
> > Has STD_FILES chosen too specific a type for these features? And is
> > there a better way of re-directing the io.output to a string?
> At the moment, I don't see an easy way.
> Regards,
> Manu
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/eiffel_software/<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/eiffel_software/join (Yahoo! ID required)
<*> To change settings via email:
mailto:
eiffel_software-digest@...
mailto:
eiffel_software-fullfeatured@...
<*> To unsubscribe from this group, send an email to:
eiffel_software-unsubscribe@...
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/