[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [tolua++] support multiple inehritance
- From: Ariel Manzur <listas@...>
- Date: Tue, 4 Oct 2005 18:32:08 -0400
On Sat, Oct 01, 2005 at 12:23:11AM +0200, Mildred wrote:
> Hi,
>
> Is it possible to have multiple inehritance with tolua++ w/o using
> syntax like:
> myobject.__parent__:mymethod()
> ?
Hi. I should point out that internally tolua++ adds a variable declaration
that looks like this for each additional base type:
tolua_inherits parent* __parent__;
so it's just a regular variable, with the 'tolua_inherits' hint, which
produces the code that casts the object correctly. You could add something
like
tolua_inherits parent* p;
and then use 'myobject.p:method()', which is a bit less annoying :) This
should also work for cases when the object can be converted to other types
(like 'operator type*();')
Ariel.