From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c4c8028cd0fdf47,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!o41g2000yqb.googlegroups.com!not-for-mail From: xorque Newsgroups: comp.lang.ada Subject: Overriding the "lowest level" stream procedures Date: Sun, 11 Oct 2009 07:56:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 78.143.202.207 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1255272994 5282 127.0.0.1 (11 Oct 2009 14:56:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 11 Oct 2009 14:56:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o41g2000yqb.googlegroups.com; posting-host=78.143.202.207; posting-account=D9GNUgoAAAAmg7CCIh9FhKHNAJmHypsp User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.0.13) Gecko/2009081019 Firefox/3.0.13,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8665 Date: 2009-10-11T07:56:34-07:00 List-Id: 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?