class scope virtual template functions
janderson
askme at me.com
Fri May 30 08:20:41 PDT 2008
BCS wrote:
> Reply to janderson,
>
>>
>> Call it like:
>>
>> this.Templet()!("foo")(arg)
>>
>> //Might simplify to due to D's magic property stuff
>> this.Templet!("foo")(arg)
>>
>> Something like that. Haven't tried it so don't know if it would work
>> and what massaging would be needed.
>>
>> -Joel
>>
>
> that still wouldn't work in my case because I'm looking at mucking with
> the vtbl to, at runtime generate new types. (yes I know I'm crazy)
>
>
Humm. Maybe not. There is a vtable in there (although not one entry by
type and there's one more level of function indirection. I guess what
I'm saying is the delegate/method that is passed into the TemplateMaker
is like an entry in a vtable, and TemplateMaker is like the container
for that entry (something like that). I imagine you could write
something special case for that particular case, its just code right?
But I can see your point.
-Joel
More information about the Digitalmars-d
mailing list