dhaker13 / v8-juice

Automatically exported from code.google.com/p/v8-juice
Other
0 stars 0 forks source link

RFE: binding of _inherited_ functions from parent class #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Consider this case:

struct A
{
   int func();
   ....
};

struct B : A
{
...
};

We want to bind B to JS without binding A and we want to bind A::func() to 
the JS B objects. In principal, no problem, but...

The current binding templates cannot handle the case of binding inherited 
members unless one uses an ugly cast to make it work (and then it's 
undefined behaviour, AFAIK). i think i'll have to add another set of 
templates similar to MemFuncInvocable (or whatever i renamed that class to 
in the past few days), but with funcs taking an additional type (the base 
type) argument. Before i do that, i'd like to explore how i can use 
TypeLists to simplify the function/member-to-InvocationCallback APIs.

Original issue reported on code.google.com by sgbeal@googlemail.com on 29 Oct 2009 at 5:47

GoogleCodeExporter commented 9 years ago

Original comment by sgbeal@googlemail.com on 29 Oct 2009 at 5:48