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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,335f67c75a2a5d5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-28 19:04:17 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!newshub2.rdc1.sfba.home.com!news.home.com!news1.frmt1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ?? References: <3A4B557F.F167C8E@home.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Fri, 29 Dec 2000 03:04:17 GMT NNTP-Posting-Host: 24.20.190.201 X-Complaints-To: abuse@home.net X-Trace: news1.frmt1.sfba.home.com 978059057 24.20.190.201 (Thu, 28 Dec 2000 19:04:17 PST) NNTP-Posting-Date: Thu, 28 Dec 2000 19:04:17 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: supernews.google.com comp.lang.ada:3441 Date: 2000-12-29T03:04:17+00:00 List-Id: >This suggests that I have to define my own S'Class'Input() >instead. This would allow me to read the tag in, in any way I >please, but then how do I proceed from there? How does the >Ada S'Class'Input() dispatch once the external tag is known? It calls A'Input() if the data indicated type A, or B'Input() if the data indicated type B, etc. So if you can use for A'External_Tag use "RIFF"; statements to cover all your tags, you needn't override S'Class'Input. If your external way of specifying a type is too complex for that, you will have to override S'Class'Input, and your code will have to know about all the possible external tags and it will have to call A'Input() or B'Input() or C'Input() as needed. Quite independently, if the external data organization doesn't happen to match what your compiler expects, say because bounds are stored differently, you'll have to override A'Input et al. As has been pointed out, "For elementary types, the representation in terms of stream elements is implementation defined." You may be unpleasantly surprised. The order of calls for a composite type is specified though, so if you write overrides for all the elementary types, and any composite types that differ in data layout order, you should be in good shape.