comp.lang.ada
 help / color / mirror / Atom feed
From: okellogg <okellogg@freenet.de>
Subject: Re: Generalized serialization for enumeration types
Date: Wed, 26 Aug 2009 04:00:52 -0700 (PDT)
Date: 2009-08-26T04:00:52-07:00	[thread overview]
Message-ID: <54f0af10-4029-4209-84c4-163e3dcd56a9@r42g2000yqj.googlegroups.com> (raw)
In-Reply-To: 249a69e5-8e21-4968-a183-64732618660a@h21g2000yqa.googlegroups.com

On 26 Aug., 12:22, xorque <xorquew...@googlemail.com> wrote:
> [...]
> The encoding rules are simple:
>
>   The enumeration values are converted to unsigned 32 bit
>   integers with the first value as 0 and increasing sequentially
>   with each new value.
> [...]
> Freezing rules prevented me from writing a generic
> Packed_Enumeration_IO
> package ("representation item appears too late").

If your enums are represented as you describe then why do you need
representations?
You could rely on the natural Ada representation (which happens to
conform with your encoding rules as far as the enum values are
concerned).

--Oliver



  reply	other threads:[~2009-08-26 11:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26 10:22 Generalized serialization for enumeration types xorque
2009-08-26 11:00 ` okellogg [this message]
2009-08-26 11:33   ` xorque
2009-08-26 12:03     ` okellogg
2009-08-26 11:17 ` Georg Bauhaus
2009-08-26 11:35   ` xorque
2009-08-26 12:05 ` Dmitry A. Kazakov
2009-08-26 19:44 ` Jeffrey R. Carter
2009-08-27  5:05 ` sjw
2009-08-28 10:47   ` xorque
replies disabled

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