From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.68.113 with SMTP id v17mr689315obt.2.1449595498782; Tue, 08 Dec 2015 09:24:58 -0800 (PST) X-Received: by 10.182.247.67 with SMTP id yc3mr14737obc.0.1449595498752; Tue, 08 Dec 2015 09:24:58 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!mv3no13443299igc.0!news-out.google.com!l1ni616igd.0!nntp.google.com!mv3no13443298igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 8 Dec 2015 09:24:58 -0800 (PST) In-Reply-To: <1krm4xun4e4ny.jmh9kvf6s0a9.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.107.233.114; posting-account=6m7axgkAAADBKh082FfZLdYsJ24CXYi5 NNTP-Posting-Host: 94.107.233.114 References: <8bc7fd76-f00a-4eea-9715-470af028fc84@googlegroups.com> <1krm4xun4e4ny.jmh9kvf6s0a9.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <12dc7aea-933d-4271-95bd-10df808917e4@googlegroups.com> Subject: Re: I'm facing an issue with: call to abstract procedure must be dispatching From: Serge Robyns Injection-Date: Tue, 08 Dec 2015 17:24:58 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28710 Date: 2015-12-08T09:24:58-08:00 List-Id: 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