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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-10 12:51:19 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9kbvsr$a02@augusta.math.psu.edu> <3B69DB35.4412459E@home.com> <3B6F312F.DA4E178E@home.com> <23lok9.ioi.ln@10.0.0.2> <3B70AB15.35845A98@home.com> <3B70C665.BBC5F000@home.com> <3B721BC3.76A2161C@home.com> <3B732365.81CFD607@home.com> <5ee5b646.0108100913.42e2b744@posting.google.com> Subject: Re: Data portability with streams Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Fri, 10 Aug 2001 15:51:07 EDT Organization: http://www.newsranger.com Date: Fri, 10 Aug 2001 19:51:07 GMT Xref: archiver1.google.com comp.lang.ada:11780 Date: 2001-08-10T19:51:07+00:00 List-Id: In article <5ee5b646.0108100913.42e2b744@posting.google.com>, Robert Dewar says... > >Ted Dennison wrote in message news:... >> I think one possible way to do this without causing a ton of work >> would be to create a "translation generic" for each target (ASN.1 or >> XDR) type. Hmmm. That might be worth experimenting with one day... > >In GNAT, this is most easily achieved by providing your own version >of System.Stream_Attributes. We supply two, one corresponding to normal >memory layout, and one corresponding to XDR. That's kinda neat! It handles the built-in types, rather than the user-defined ones. The main reason I thought the generics would be useful would be for dealing with all the user-defined types. There are only going to be a certian amount of possible "destination" types in the encoding, but there are an unlimited number of possible user-defined types. However, those must be built using base types, so being able to rewrite your base types' attributes might take care of most of the problem much more easily. This still won't take care of ASN.1's array and record encoding types though. You could just ignore that issue by pretending everything is just sequences of individual objects, but I take it that the "DER" that I've heard mentioned would prohibit that. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com