From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Binary and XML serialization of types
Date: Thu, 23 Jan 2014 18:58:51 -0600
Date: 2014-01-23T18:58:51-06:00 [thread overview]
Message-ID: <lbsdsb$f99$1@loke.gir.dk> (raw)
In-Reply-To: 0301ad03-929d-4c9b-8849-494f7f78c777@googlegroups.com
<adambeneschan@gmail.com> wrote in message
news:0301ad03-929d-4c9b-8849-494f7f78c777@googlegroups.com...
> On Thursday, January 23, 2014 2:44:16 PM UTC-8, Simon Wright wrote:
>
>> > What's going on is that if some client package says "with A.Types" and
>> > uses the Guid_Write type, and uses Guid_Write'Write(...) or
>> > Guid_Write'Output(...), the client has to know that there's a Write
>> > routine that isn't the default. That's why the "for Guid_Write'Write
>> > use ..." has to be in the visible part of A.Types, so that other
>> > clients are allowed to know about it.
>>
>> The type was called Guid.
>
>> But, more importantly, are you sure about this? GNAT's
>> Ada.Containers.Vectors, for example, declares the stream-related stuff
>> in the private part.
>
> Sorry, I think I must have had caffeine deficiency syndrome when I wrote
> that.
>
> You're right. Here's what I should have said:
>
> What's going on is that "for Guid'Write" specifies a property, or
> "aspect", of the type Guid,
> and that needs to be done in the same place where Guid is defined, which
> in this case is
> the package specification (although it could be in the private part).
To clarify (or confuse?) this more, it does have to be visible if Guid is a
limited type, because in that case it won't have a usable 'Write unless it
is explicitly defined. For other types, it can be in the private part.
Randy.
next prev parent reply other threads:[~2014-01-24 0:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 18:53 Binary and XML serialization of types hanslad
2014-01-23 19:15 ` adambeneschan
2014-01-23 19:17 ` adambeneschan
2014-01-23 19:58 ` hanslad
2014-01-23 20:03 ` adambeneschan
2014-01-23 21:00 ` Dmitry A. Kazakov
2014-01-24 8:54 ` hanslad
2014-01-24 10:01 ` Dmitry A. Kazakov
2014-01-24 14:44 ` hanslad
2014-01-24 15:22 ` Dmitry A. Kazakov
2014-01-31 9:51 ` hanslad
2014-01-31 10:49 ` Dmitry A. Kazakov
2014-02-04 10:33 ` AdaMagica
2014-02-04 11:14 ` Dmitry A. Kazakov
2014-02-04 11:20 ` AdaMagica
2014-02-04 13:04 ` Dmitry A. Kazakov
2014-02-04 17:16 ` AdaMagica
2014-02-04 17:57 ` Dmitry A. Kazakov
2014-02-04 22:34 ` Simon Wright
2014-02-05 9:02 ` AdaMagica
2014-02-05 9:39 ` Simon Wright
2014-02-05 10:35 ` Dmitry A. Kazakov
2014-02-05 13:03 ` AdaMagica
2014-02-05 13:44 ` G.B.
2014-02-05 15:34 ` Niklas Holsti
2014-02-06 1:32 ` adambeneschan
2014-01-24 17:36 ` Simon Wright
2014-01-24 8:44 ` Georg Bauhaus
2014-01-24 17:13 ` Simon Wright
2014-01-23 22:44 ` Simon Wright
2014-01-23 23:43 ` adambeneschan
2014-01-24 0:58 ` Randy Brukardt [this message]
2014-01-24 8:29 ` Oliver Kleinke
2014-01-24 16:22 ` adambeneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox