Re: I/O streaming with custom data transport



On Wed, 2006-11-22 at 15:37 +0100, Maciej Sobczak wrote:

For the moment I assume that in order to do this with text, I have to
first format it in some string buffer and then do:

String'Write(S, Buf);

Have you considered
for T'Write use Your_Function...

Also, Ada.Text_IO.Text_Streams is an example of how to use
the attribute functions with text file streams. So you'd have
the formatting in 'Write and the transport mechanics in the
new byte stream type.


.