From: Dave Thompson <david.thompson1@worldnet.att.net>
Subject: Re: pointer questions
Date: Mon, 07 Nov 2005 04:21:08 GMT
Date: 2005-11-07T04:21:08+00:00 [thread overview]
Message-ID: <65ltm11d842tegobi60hi2njt82j6st87m@4ax.com> (raw)
In-Reply-To: wccr7a7rqr3.fsf@shell01.TheWorld.com
On 27 Oct 2005 10:14:40 -0400, Robert A Duff
<bobduff@shell01.TheWorld.com> wrote:
> Szymon Guz <alpha@skynet.org.pl_WITHOUT> writes:
>
> > Well, that's how I thought but I wanted to ask. The problem that I want
> > to solve is how to create a property in type like that ones in
> > Delphi|Builder, so I have defined the property name, value, read and
> > write functions. I thought that it could be done by defining a generic
> > structure like this: <snip>
>
> I'm not sure I fully understand what you're trying to do, but I suspect
> you can do it with a hierarchy of tagged types. You will have an
> access-to-class-wide type, which is sort of like "void *", but it's
> safe.
>
Actually Ada access to classwide is much more like C++ pointer to
baseclass, or possibly reference to baseclass, which are similarly
typesafe (at least in themselves; of course in C++ you are more likely
to have passed them through other unsafe constructs elsewhere).
> Alternatively, a generic package might do what you want.
> You would have one instance for each type of Value you
> want to store. This method might be safer, but less flexible.
>
That said, in this case I think generic probably is better.
- David.Thompson1 at worldnet.att.net
next prev parent reply other threads:[~2005-11-07 4:21 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-26 23:01 pointer questions Szymon Guz
2005-10-26 23:51 ` Gene
2005-10-26 23:58 ` tmoran
2005-10-27 1:12 ` Stephen Leake
2005-10-27 2:30 ` Steve
2005-10-27 5:56 ` Jeffrey R. Carter
2005-10-27 10:19 ` Szymon Guz
2005-10-27 14:14 ` Robert A Duff
2005-11-07 4:21 ` Dave Thompson [this message]
2005-10-27 14:11 ` Robert A Duff
2005-10-27 15:13 ` Marc A. Criley
2005-10-27 18:53 ` Jeffrey R. Carter
2005-10-27 17:29 ` Martin Dowie
2005-10-27 18:28 ` Marc A. Criley
2005-10-27 19:28 ` Martin Dowie
2005-10-28 0:12 ` Robert A Duff
2005-10-28 11:57 ` Dr. Adrian Wrigley
2005-10-28 21:26 ` Jeffrey R. Carter
2005-10-30 22:26 ` Robert A Duff
2005-10-31 6:21 ` Jeffrey R. Carter
2005-11-02 0:52 ` Dr. Adrian Wrigley
2005-11-02 3:46 ` Jeffrey R. Carter
2005-11-02 11:16 ` Dr. Adrian Wrigley
2005-11-02 13:39 ` Robert A Duff
2005-11-02 15:34 ` Bob Spooner
2005-11-02 18:59 ` Björn Persson
2005-10-27 18:43 ` Jeffrey R. Carter
2005-10-28 0:42 ` Robert A Duff
2005-10-28 5:58 ` Martin Dowie
2005-10-28 21:24 ` Jeffrey R. Carter
2005-10-28 11:53 ` David
2005-10-29 12:25 ` Simon Wright
2005-10-27 17:19 ` Martin Krischik
2005-11-07 4:21 ` Dave Thompson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox