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.50.79.129 with SMTP id j1mr29917750igx.7.1441802461940; Wed, 09 Sep 2015 05:41:01 -0700 (PDT) X-Received: by 10.182.105.34 with SMTP id gj2mr131971obb.34.1441802461892; Wed, 09 Sep 2015 05:41:01 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!kq10no2950293igb.0!news-out.google.com!f6ni5643igi.0!nntp.google.com!kq10no2234404igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 9 Sep 2015 05:41:01 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=155.210.217.198; posting-account=ZsBWjAoAAACn5uHwNWb19e60TrEtWbAD NNTP-Posting-Host: 155.210.217.198 References: <625c79d2-f5ed-4cd4-80ea-ea310e381017@googlegroups.com> <87y4ggm71k.fsf@adaheads.sparre-andersen.dk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: working with diferent instances of the same generic interface From: Aitor Alcrudo Sangros Injection-Date: Wed, 09 Sep 2015 12:41:01 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:27750 Date: 2015-09-09T05:41:01-07:00 List-Id: El mi=E9rcoles, 9 de septiembre de 2015, 14:17:52 (UTC+2), Egil H H escrib= i=F3: > On Wednesday, September 9, 2015 at 1:08:51 PM UTC+2, Aitor Alcrudo Sangro= s wrote: > >=20 > Reporting_basic.Reporting_Element_Access is an access type that can=20 > only point to variables of type Reporting_basic.Reporting_Element. >=20 > Element_type_A_Access is an access type that can > only point to variables of type Element_type_A=20 > (which derives from Reporting_some.Reporting_Element) >=20 > Reporting_some.Reporting_Element and Reporting_basic.Reporting_Element > are two different types. Converting between them (or access to them)=20 > would be like trying to convert a giraffe into an elephant. >=20 >=20 > --=20 > ~egilhh Well they instance the same generic interface so more like trying to turn a= dog into a coyote, but that's why I'm asking for help. There should be a way to make Manager be able to work with objects of diffe= rent instances of the generic Reporting_Element interface. The class Manage= r does not need to know the internals of any of those instances just that t= hey implement some functions and procedures that can be called. I am trying to determine if this is at all possible and how should I go abo= ut it. From what I know of Ada and other languages I think it should be doa= ble so I'm trying to find the correct way.