Changeset 8385 in orxonox.OLD for branches/script_engine/src/lib/util/executor
- Timestamp:
- Jun 14, 2006, 2:21:59 PM (19 years ago)
- Location:
- branches/script_engine/src/lib/util/executor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/util/executor/executor_lua.cc
r8271 r8385 20 20 std::string temp; 21 21 22 template<typename type> type* fromLua(lua_State* state, int index) { type *obj = Lunar<type>::check(state, 1); return obj;}; 22 23 template<> bool fromLua<bool>(lua_State* state, int index) { return lua_toboolean(state, index); }; 23 24 template<> int fromLua<int>(lua_State* state, int index) { return (int)lua_tonumber(state, index); }; … … 28 29 29 30 30 31 template<typename type> void toLua(lua_State* state, type value) { Lunar<type>::push(state, value, false); }; 31 32 template<> void toLua<bool>(lua_State* state, bool value) { lua_pushboolean(state, (int) value); }; 32 33 template<> void toLua<int>(lua_State* state, int value) { lua_pushnumber(state, (lua_Number) value); }; -
branches/script_engine/src/lib/util/executor/executor_lua.h
r8271 r8385 11 11 #include "debug.h" 12 12 #include "luaincl.h" 13 14 15 16 template<typename type> type fromLua(lua_State* state, int index) { PRINTF(1)("NOT IMPLEMENTED\n"); }; 13 #include "lunar.h" 14 15 16 17 template<typename type> type fromLua(lua_State* state, int index); 17 18 template<> bool fromLua<bool>(lua_State* state, int index); 18 19 template<> int fromLua<int>(lua_State* state, int index); … … 23 24 24 25 25 template<typename type> void toLua(lua_State* state, type value) { PRINTF(1)("NOT IMPLEMENTED\n"); };26 template<typename type> void toLua(lua_State* state, type value); 26 27 template<> void toLua<bool>(lua_State* state, bool value); 27 28 template<> void toLua<int>(lua_State* state, int value);
Note: See TracChangeset
for help on using the changeset viewer.