comp.lang.ada
 help / color / mirror / Atom feed
From: xorque <xorquewasp@googlemail.com>
Subject: Overriding the "lowest level" stream procedures
Date: Sun, 11 Oct 2009 07:56:34 -0700 (PDT)
Date: 2009-10-11T07:56:34-07:00	[thread overview]
Message-ID: <ff5f5794-61d8-4745-8d69-7bb3bab452c9@o41g2000yqb.googlegroups.com> (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?



             reply	other threads:[~2009-10-11 14:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-11 14:56 xorque [this message]
2009-10-11 15:39 ` Overriding the "lowest level" stream procedures Samuel Tardieu
2009-10-11 18:57   ` sjw
2009-10-11 19:31     ` Samuel Tardieu
replies disabled

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