Razish / japp

JA++ server and client modification for Jedi Academy
GNU General Public License v2.0
44 stars 30 forks source link

C++ Wrapper for lua #318

Closed Exmirai closed 8 years ago

Exmirai commented 9 years ago

Can it be useful?

Razish commented 9 years ago

What do you mean? I think it's fine as is.

Exmirai commented 9 years ago

something like

    LuaRef s = getGlobal(L, "testString");
    LuaRef n = getGlobal(L, "number");
    std::string luaString = s.cast<std::string>();
    int answer = n.cast<int>();
    std::cout << luaString << std::endl;
    std::cout << "And here's our number:" << answer << std::endl;
Razish commented 9 years ago

Don't need it templated. Probably best to keep it as is. Could add more helper functions, but I don't know what really needs it.

ensiform commented 9 years ago

Luabind would be nice

Razish commented 9 years ago

Not sure. Existing implementation works, LuaBind seems more related to binding data between C++ classes and Lua.

Razish commented 8 years ago

I think it's best to keep it as is, and provide more helper functions as needed.