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-Thread: 103376,7272aa7508a3d83f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: pointer questions Date: 27 Oct 2005 10:14:40 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1130422481 28516 192.74.137.71 (27 Oct 2005 14:14:41 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 27 Oct 2005 14:14:41 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:5990 Date: 2005-10-27T10:14:40-04:00 List-Id: Szymon Guz 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: > > Name > Value > Get_Function > Set_Function > > when Value is a pointer to value, Get and Set are pointers to function > for setting and getting the value. That's why I thought about universal > variable pointer. 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. 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. - Bob