comp.lang.ada
 help / color / mirror / Atom feed
* Simple example on interfaces
@ 2021-01-25 16:08 Mario Blunk
  2021-01-25 16:41 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Mario Blunk @ 2021-01-25 16:08 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2021-01-30  8:33 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25 16:08 Simple example on interfaces Mario Blunk
2021-01-25 16:41 ` 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

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