comp.lang.ada
 help / color / mirror / Atom feed
From: 402450@cepsz.unizar.es (Jano)
Subject: Re: Problem with access parameter
Date: 25 May 2004 08:48:12 -0700
Date: 2004-05-25T08:48:12-07:00	[thread overview]
Message-ID: <5d6fdb61.0405250748.70165b47@posting.google.com> (raw)
In-Reply-To: 5d6fdb61.0405250252.3a1f1f68@posting.google.com

Dmitry A. Kazakov wrote:

> It looks that he wants a destructor for a protected object. A rightful
> wish, or? Because protected types are not and cannot be derived from
> Limited_Controlled, he tries to inject a controlled member pointing to
> the protected parent. When parent gets finalized, the member's
> Finalize is called with access to parent's as the discriminant.

Exactly what I wanted.

> -----------------------------
> Well, it seems that the trick won't work. So one should pack the
> protected object into a limited controlled type and make proxies to
> its entries and subprograms.

That's the way I've taken. It's indeed better than my original
approach (except for the need of stubs, but I don't like to expose
protected types anyway) because I wanted to free data in a Charles
polymorphic list of classwide pointers, and I didn't want to depend on
what was finalized first: the container or my destructor (even if
there are strict rules for that, it's too fine a detail to depend on
for my tastes).



  parent reply	other threads:[~2004-05-25 15:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-25 10:52 Problem with access parameter Jano
2004-05-25 14:00 ` Jim Rogers
2004-05-25 15:32   ` Dmitry A. Kazakov
2004-05-25 14:58 ` Jano
2004-05-25 15:48 ` Jano [this message]
2004-05-26  7:05   ` Martin Krischik
2004-05-26 14:35     ` Jano
2004-05-26 16:11       ` Martin Krischik
2004-05-27  9:01         ` Jano
replies disabled

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