comp.lang.ada
 help / color / mirror / Atom feed
From: Mario Blunk <marioblunk.alere@gmail.com>
Subject: Simple example on interfaces
Date: Mon, 25 Jan 2021 08:08:05 -0800 (PST)	[thread overview]
Message-ID: <f44498d1-8675-44b2-af1e-3937dcbc7a1fn@googlegroups.com> (raw)

I'm trying to solve a problem of multiple inheritance. It seems to me that an interface could be the solution although the interface is still a mystery for me.

This is the example code:
https://github.com/Blunk-electronic/ada_training/blob/master/src/interfaces_1/interfaces_1.adb

The problem to solve is: 
Type_A2 and type_B1 shall have the property p2 which is type_enum. The anchestors of type_A2 and type_B1 must not have this property. 
Both type_A2 and type_B1 shall inherit p2 from type_C so that p2 must not be written all over again. Would an interface be the solution ?

Thanks for your help.

             reply	other threads:[~2021-01-25 16:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 16:08 Mario Blunk [this message]
2021-01-25 16:41 ` Simple example on interfaces Dmitry A. Kazakov
2021-01-25 17:51   ` Mario Blunk
2021-01-25 22:06     ` Dmitry A. Kazakov
2021-01-26  7:33       ` G.B.
2021-01-26  8:07         ` Dmitry A. Kazakov
2021-01-26  8:17           ` Mario Blunk
2021-01-26  8:55             ` Dmitry A. Kazakov
2021-01-26  9:37       ` J-P. Rosen
2021-01-26 10:25         ` Dmitry A. Kazakov
2021-01-26 11:15           ` AdaMagica
2021-01-26 11:53             ` Dmitry A. Kazakov
2021-01-26 16:46               ` AdaMagica
2021-01-26 19:44                 ` Dmitry A. Kazakov
2021-01-26 20:04                   ` Shark8
2021-01-26 21:34                     ` Dmitry A. Kazakov
2021-01-27  3:11                     ` Randy Brukardt
2021-01-27 22:51                       ` Shark8
2021-01-30  8:33                         ` Randy Brukardt
2021-01-27  3:09                   ` Randy Brukardt
2021-01-27  8:05                     ` Dmitry A. Kazakov
2021-01-26 10:02     ` Stephen Leake
2021-01-25 17:00 ` Jeffrey R. Carter
2021-01-27  1:48   ` philip...@gmail.com
2021-01-27  8:06     ` Dmitry A. Kazakov
2021-01-27  3:36   ` Randy Brukardt
2021-01-27 23:04     ` Shark8
2021-01-25 19:05 ` Stephen Leake
replies disabled

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