lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>
> Does ToLua handle C++ namespaces?  If not, is there a workaround?

tolua handles "module", a concept similar to namespace.
if you have a .pkg file with:

module modulename
{
     #define N
     extern int var;
     int func (...):
}

it is valid to write the following lua code:

print(modulename.N, modulename.var)
modulename.func(...)

>
> What about Templates?

there is no support for templates,
but you can map instances of templates.

$typedef MyList<double> NumberList;

class NumberList {
 ...
};

-- waldemar