comp.lang.ada
 help / color / mirror / Atom feed
* simulate inheritance with generic package
@ 2003-08-25  1:25 WATANABE Katsuhiro
  2003-08-25  2:04 ` Matthew Heaney
  2003-08-25 14:25 ` Robert C. Leif
  0 siblings, 2 replies; 3+ messages in thread
From: WATANABE Katsuhiro @ 2003-08-25  1:25 UTC (permalink / raw)


I'd like to know how to simulate inheritance in OO with
generic package in classic Ada, which has no tagged type.

An ancient OO book(*) instructs a way of inheritance
implementation in Ada by introducing has-a reference from
child class to parent class. And it says their functions
should be linked, that is to say, any call to the child
instance must be delegated to the parent instance. And
the description goes on as follows:

> If you use generic package this linkage can be made
> by using a specific routine as the relevant (generic)
> parameter when instantiating the package.

But, what does 'a specific routine' means?

As I am a Smalltalk programmer, I have limited knowledge
on Ada and its instanciation mechanism of generic package.
So, I'd appreciate your help showing concretely what 
'a specific routine' is.

(*)
Ivar Jacobson;
Object-Oriented Software Engineering
--- A Use Case Driven Approach ---;
Addison-Wesley;
1994

-- 
WATANABE Katsuhiro



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

end of thread, other threads:[~2003-08-25 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-25  1:25 simulate inheritance with generic package WATANABE Katsuhiro
2003-08-25  2:04 ` Matthew Heaney
2003-08-25 14:25 ` Robert C. Leif

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