comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@alexandria (Jon S Anthony)
Subject: Re: Can you help with an Ada 95 OO Problem
Date: 1997/01/20
Date: 1997-01-20T00:00:00+00:00	[thread overview]
Message-ID: <JSA.97Jan20172029@alexandria> (raw)
In-Reply-To: na.9173d8474e.a50140averon@argonet.co.uk


In article <mheaney-ya023280001801972026220001@news.ni.net> mheaney@ni.net (Matthew Heaney) writes:

> Try a view conversion of the designated object, to get at its primitive
> operation:
> 
>    Http.Headers.Init (Obj => Http.Headers.Header (Header_Ref.all));
> 
> I'm not sure that will work, but try it and let me know (so I can learn, too!).

He doesn't have a "non-access" parameter version of the operation, so
you need to add a 'Access to the converted object.  That should work,
but you can make it simpler.  Just,

   Http.Headers.Init (Obj => Http.Headers.Header(Obj.all)'Access);

The new access object is irrelevant.


> There was some debate a while back about how to invoke the parent's
> implementation of the operation.  There was one case (cited by Mitch) that
> required a very un-obvious technique.  Perhaps your difficulties mean

I think that had to do with "smoothly" changing the parent (by adding
in an intermediate).  This is fixed by using a subtype.  Works just
fine.  I suppose the 'Parent thing would look a little nicer...

/Jon

-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





  parent reply	other threads:[~1997-01-20  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-18  0:00 Can you help with an Ada 95 OO Problem David Wallace
1997-01-18  0:00 ` Matthew Heaney
1997-01-19  0:00 ` David Wallace
1997-01-21  0:00   ` Can you help with an Ada 95 OO Problem (Solution !!!) David Wallace
1997-01-20  0:00 ` Jon S Anthony [this message]
1997-01-21  0:00 ` Can you help with an Ada 95 OO Problem Jerome Desquilbet
replies disabled

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