From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b031c56dc601135 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!postnews1.google.com!not-for-mail From: 402450@cepsz.unizar.es (Jano) Newsgroups: comp.lang.ada Subject: Re: Problem with access parameter Date: 25 May 2004 08:48:12 -0700 Organization: http://groups.google.com Message-ID: <5d6fdb61.0405250748.70165b47@posting.google.com> References: <5d6fdb61.0405250252.3a1f1f68@posting.google.com> NNTP-Posting-Host: 155.210.155.44 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1085500092 19725 127.0.0.1 (25 May 2004 15:48:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 25 May 2004 15:48:12 +0000 (UTC) Xref: controlnews3.google.com comp.lang.ada:820 Date: 2004-05-25T08:48:12-07:00 List-Id: 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).