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 X-Google-Thread: 103376,e0b85aa2bdf012f2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-28 01:50:12 PST Date: Fri, 28 Mar 2003 10:50:02 +0100 From: =?ISO-8859-1?Q?Rodrigo_Garc=EDa?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Streams representation - XML References: <3e83277e@epflnews.epfl.ch> <3E834822.6000005@psu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3e841acf$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1048845007 128.178.76.8 (28 Mar 2003 10:50:07 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:35783 Date: 2003-03-28T10:50:02+01:00 List-Id: Robert Spooner wrote: > Rodrigo, > > You can define your own stream representation for a _type_ by redefining > 'read and 'write for that type. Yes, I know that (RM 13.13.2(40)). The problem with that solution is that you lose the default stream representation for that type. Besides, it does not let you override the 'Write or 'Read attributes for predefined non-limited types (e.g. "Integer") and the Stream_Element type is still fixed. I was thinking of a mechanism that would allow you, for instance, to serialize a type using XML while you could still use ordinary serialization. I am afraid that defining a new type of Stream (derived from Root_Stream_Type) is not the solution, since this is thought for specifying new back-ends and ways of reading/writing but not for stating a different representation... Rodrigo > > Bob > > Rodrigo Garc�a wrote: > >> Hi, >> >> Can a new type of Stream define its own representation? I am afraid >> the answer is no...(Stream_Element is implementation defined but it >> cannot be changed). >> >> Rodrigo >> > >