comp.lang.ada
 help / color / mirror / Atom feed
Subject: Re: Ada Streams representation - XML
Date: Fri, 28 Mar 2003 10:50:02 +0100
Date: 2003-03-28T10:50:02+01:00	[thread overview]
Message-ID: <3e841acf$1@epflnews.epfl.ch> (raw)
In-Reply-To: 3E834822.6000005@psu.edu

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
>>
> 
> 





  reply	other threads:[~2003-03-28  9:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-27 16:31 Ada Streams representation 
2003-03-27 18:51 ` Robert Spooner
2003-03-28  9:50   `  [this message]
2003-03-28 15:46     ` Ada Streams representation - XML Robert Spooner
2003-03-28 18:45       ` 
replies disabled

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