comp.lang.ada
 help / color / mirror / Atom feed
* Overriding the "lowest level" stream procedures
@ 2009-10-11 14:56 xorque
  2009-10-11 15:39 ` Samuel Tardieu
  0 siblings, 1 reply; 4+ messages in thread
From: xorque @ 2009-10-11 14:56 UTC (permalink / raw)


Hello.

I'd like to ensure that any piece of code in a program that executes:

  T'Output (Stream, S);
  S := T'Input (Stream);

(Where T is String or a type derived from String and S is an object of
any of those types)

... Has to go through my (overridden) Stream procedures. I'm
essentially trying to ensure that all textual data is written in a
strictly defined (not implementation defined) format so that the
program can communicate with other programs not written in
Ada. I also want to make it as hard as possible to, for example,
accidentally miss out a statement such as:

  for X'Output use Some_Output_Procedure;

...and end up using the default stream procedures again.

I think I probably need to define my own Stream type. Is this the
case?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-11 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-11 14:56 Overriding the "lowest level" stream procedures xorque
2009-10-11 15:39 ` Samuel Tardieu
2009-10-11 18:57   ` sjw
2009-10-11 19:31     ` Samuel Tardieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox