Getting derived classes
Bill Baxter
wbaxter at gmail.com
Fri Oct 17 14:34:59 PDT 2008
On Sat, Oct 18, 2008 at 6:20 AM, BCS <ao at pathlink.com> wrote:
> Reply to dsimcha,
>
>> I know that, in std.traits, there's a template that spits out all base
>> classes for a given class. Based on reading the source, it seems to
>> work based on a rather interesting use case for is expressions. Is
>> there any equivalent way to do the opposite: For any given position
>> in a class hierarchy, to get a tuple of all possible descendants?
>>
>
> Via DLL/SO's, a derived class can be /written/ after the program that it
> will be used in is /compiled/. Because of that (and other less restrictive
> forms of that issue) The most general answer is; can't be done.
I wonder what Object.Factory does when you try to make a class from a
DLL like that.
I'm guessing it doesn't work.
--bb
More information about the Digitalmars-d
mailing list