From: porton@ex-code.com (Victor Porton)
Subject: Re: Finalization of tagged types - problem
Date: Mon, 13 Jan 2003 16:28:53 +0500
Date: 2003-01-13T11:31:42+00:00 [thread overview]
Message-ID: <3e22a39e$0$33926$bed64819@news.gradwell.net> (raw)
In-Reply-To: mailman.1042446542.5578.comp.lang.ada@ada.eu.org
In article <mailman.1042446542.5578.comp.lang.ada@ada.eu.org>,
"Grein, Christoph" <christoph.grein@eurocopter.com> writes:
> From: porton@ex-code.com (Victor Porton)
>
>> I have a non-limited tagged type (not derived from
>> Ada.Finalization.Controlled) Base.
>>
>> I derive:
>>
>> type State_Type is new Base with
>> record
>> -- ...
>> Finalizer: Finalizer_Type(State_Type'Access);
>> end record;
>>
>> I want to add a component with back-reference derived
>> from Ada.Finalization.Controlled or
>> Ada.Finalization.Limited_Controlled for auto-finalization
>> of State_Type.
>>
>> But
>>
>> type Finalizer_Type(State: access State_Type) is
>> new Ada.Finalization.Controlled with null record;
>>
>> Compiler: "Access discriminant are allowed only for limited types".
>>
>> Can be done something among the obvious but imperfect
>> solutions: 1. make Base controlled. 2. make Base limited
>> and derive Finalizer_Type from Limited_Controlled instead?
>
> I've published a few years ago in Ada Letters a paper "Add Finalization" dealing
> with this problem. You can find it online on my home page
>
> <http://home.T-Online.de/home/Christ-Usch.Grein/Ada/Finalization.html>
Christoph, thanks.
So is it your opinion: derive from Controlled if it may be needed
in a derived?
BTW, Is derivance from Controlled a big overhead?
next prev parent reply other threads:[~2003-01-13 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-13 8:21 Finalization of tagged types - problem Grein, Christoph
2003-01-13 11:28 ` Victor Porton [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-13 11:48 Grein, Christoph
2003-01-13 1:11 Victor Porton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox