[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: A factory in lunar
- From: Geoffroy Carrier <geoffroy.carrier@...>
- Date: Mon, 3 Aug 2009 17:03:28 +0200
Hi!
I'm trying to use lunar with my C++ code...
I'd like to expose a factory to Lua.
In short, my problem is something like (see the comment):
class MyClassFactoryWrapperForLua {
MyClassFactory * factory;
int Create(lua_State * L) {
char * param = luaL_checkstring(L, 1);
////
// How can I push on the stack
// an object using MyClassWrapperForLua
// generated through factory->NewObject(param);
////
}
}
class MyClassWrapperForLua {
MyClass * object;
[...]
}
Any idea?
--
Geoffroy Carrier