From: Graham <graham.stark@virtual-worlds.biz>
Subject: Re: using an Ada.Container as a private type
Date: Fri, 4 Apr 2008 01:02:30 -0700 (PDT)
Date: 2008-04-04T01:02:30-07:00 [thread overview]
Message-ID: <d11799dc-566d-412e-a4f0-356f4780602f@t54g2000hsg.googlegroups.com> (raw)
In-Reply-To: 5c9b6d27-d54a-43ae-aba8-8ef4b522fbc5@e10g2000prf.googlegroups.com
On Apr 3, 9:41 pm, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
> On 3 Kwi, 17:29, Graham <graham.st...@virtual-worlds.biz> wrote:
>
> > package Payment_Stream_Package is new Ada.Containers.Ordered_Maps(
> > Element_Type => Money,
> > Key_Type => Positive );
>
> > type Payment_Stream is new Payment_Stream_Package.Map;
>
> Instead of a solution, I have a question:
>
> Why do you derive from Map? Which operations of Map do you plan to
> override?
>
> Do you ever plan to pass Payment_Stream where
> Payment_Stream_Package.Map'Class is expected? What effect would you
> like to achieved this way?
>
> Why derivation and not composition?
>
> --
> Maciej Sobczak *www.msobczak.com*www.inspirel.com
Good question. The intention was not to derive from Map at all: I
simply wanted to keep the fact that it was implemented as a Map
private. Is there a better way of doing that, or is keeping it private
overdesign?
Graham
next prev parent reply other threads:[~2008-04-04 8:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-03 15:29 using an Ada.Container as a private type Graham
2008-04-03 16:00 ` Robert A Duff
2008-04-03 16:02 ` Dmitry A. Kazakov
2008-04-03 16:20 ` Graham
2008-04-03 20:41 ` Maciej Sobczak
2008-04-04 8:02 ` Graham [this message]
2008-04-04 15:57 ` Adam Beneschan
2008-04-04 17:25 ` Robert A Duff
2008-04-04 19:37 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox