Getting derived classes
BCS
ao at pathlink.com
Fri Oct 17 17:11:56 PDT 2008
Reply to Bill,
> 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
>
it might work by hiding a static this function that registries the class,
from that, when the dll lodes the class is registered.
More information about the Digitalmars-d
mailing list