comp.lang.ada
 help / color / mirror / Atom feed
From: Serge Robyns <serge.robyns@gmail.com>
Subject: Re: I'm facing an issue with: call to abstract procedure must be dispatching
Date: Tue, 8 Dec 2015 09:24:58 -0800 (PST)
Date: 2015-12-08T09:24:58-08:00	[thread overview]
Message-ID: <12dc7aea-933d-4271-95bd-10df808917e4@googlegroups.com> (raw)
In-Reply-To: <1krm4xun4e4ny.jmh9kvf6s0a9.dlg@40tude.net>

On Tuesday, 8 December 2015 18:05:09 UTC+1, Dmitry A. Kazakov  wrote:

>    The_Store : aliased T_Store;
>    Client : T_Client;
> begin
>    The_Store.Insert  (Client);

Yes, I know this does work.  I did compile the example first like that.  But this is an attempt to "simplify" the problem to post it here.  What really happens is the following.

In the main package I'm actually calling other packages passing the The_Store. For example:

-- with Store.Gnatcoll_version;
with Store.Inmemory_Container_version;

Both implement the same interface but with different underlying storage.
In the case of in_memory, I'll keep containers inside the type T_Data_Store
and in case of Gnatcoll some DB parameters inside T_Data_Store
and then ...

   Do_Something (The_Store);

The signature of Do_Something is
   procedure Do_Something (A_Store : in out T_Abstract_Store);

Inside that procedure I'm using the A_Store.  This regardless how A_Store got implemented.

However all "users" will just call "A_Store.Insert (Something);" or "Something := A_Store.Get (ID);", etc.

If I've to use the "real" instance, I've to edit all packages that "with"'s depending on the case.  In some languages this could controlled by a pre-processor directive.  Any other suggestion?

Serge


  reply	other threads:[~2015-12-08 17:24 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 16:45 I'm facing an issue with: call to abstract procedure must be dispatching Serge Robyns
2015-12-08 16:59 ` G.B.
2015-12-08 17:04 ` Dmitry A. Kazakov
2015-12-08 17:24   ` Serge Robyns [this message]
2015-12-08 17:42     ` Dmitry A. Kazakov
2015-12-08 18:00       ` Serge Robyns
2015-12-08 18:22         ` Dmitry A. Kazakov
2015-12-08 20:21           ` Serge Robyns
2015-12-08 21:08             ` Dmitry A. Kazakov
2015-12-08 21:55               ` Serge Robyns
2015-12-08 22:43                 ` Serge Robyns
2015-12-08 22:55                   ` Jeffrey R. Carter
2015-12-09 23:03                     ` Randy Brukardt
2015-12-10  8:38                       ` Serge Robyns
2015-12-10 23:43                         ` Randy Brukardt
2015-12-09  8:48                 ` Dmitry A. Kazakov
2015-12-09 10:53               ` G.B.
2015-12-09 12:03                 ` Dmitry A. Kazakov
2015-12-09 13:42                   ` G.B.
2015-12-09 14:23                     ` Dmitry A. Kazakov
2015-12-08 22:55             ` Jeffrey R. Carter
2015-12-08 23:04               ` Serge Robyns
2015-12-08 23:42                 ` Jeffrey R. Carter
2015-12-09 13:40                 ` Jere
2015-12-09 13:48                   ` G.B.
2015-12-09 15:33                     ` Jere
2015-12-13 21:37                 ` Shark8
2015-12-14  2:20                   ` Jeffrey R. Carter
2015-12-15  7:26                     ` Shark8
2015-12-08 17:30 ` Jeffrey R. Carter
2015-12-08 17:48   ` Serge Robyns
2015-12-08 18:46     ` Jeffrey R. Carter
2015-12-08 20:28       ` Serge Robyns
2015-12-08 22:20     ` 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