comp.lang.ada
 help / color / mirror / Atom feed
From: Warren <ve3wwg@gmail.com>
Subject: Q: How to inherit methods from parent tagged object?
Date: Thu, 21 May 2020 06:23:49 -0700 (PDT)
Date: 2020-05-21T06:23:49-07:00	[thread overview]
Message-ID: <3e90280f-ea64-4f85-a1fa-5d2fc75e0ddf@googlegroups.com> (raw)

I've become rusty and am refreshing myself with Ada again using a pet project..

I have a tagged class that I want to inherit all but one of the methods for:

   type Flash is new Emulator.Memory.Flash with private;
   
   procedure Initialize(Obj: in out Flash);
--   function Fetch(Obj: in out Flash; Address: Address_Type) return Word_Type;
--   function First_Address(Obj: in Flash) return Address_Type;
--   function Last_Address(Obj: in Flash) return Address_Type;

The only thing I want to override in the new object is the Initialize procedure for the new object. There must be a way to specify that but I can't seem to goggle it on the interwebs. Every example I can find completely redefines all of the methods.  

I'd like to avoid re-specifying the bodies of Fetch, First_Address and Last_Address for the new object, if that is permitted.  If memory serves, there is a way... but the worms have invaded my brain.


             reply	other threads:[~2020-05-21 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 13:23 Warren [this message]
2020-05-21 13:50 ` Q: How to inherit methods from parent tagged object? Jere
2020-05-21 14:20   ` Warren
replies disabled

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