Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8385 in orxonox.OLD for branches/script_engine/src/lib/util


Ignore:
Timestamp:
Jun 14, 2006, 2:21:59 PM (18 years ago)
Author:
snellen
Message:

executor_lua shuould now be able to handle orxonox objects

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  
    2020std::string temp;
    2121
     22template<typename type> type* fromLua(lua_State* state, int index) { type *obj = Lunar<type>::check(state, 1); return obj;};
    2223template<> bool fromLua<bool>(lua_State* state, int index) { return lua_toboolean(state, index); };
    2324template<> int fromLua<int>(lua_State* state, int index) { return (int)lua_tonumber(state, index); };
     
    2829
    2930
    30 
     31template<typename type> void toLua(lua_State* state, type value) { Lunar<type>::push(state, value, false); };
    3132template<> void toLua<bool>(lua_State* state, bool value) { lua_pushboolean(state, (int) value); };
    3233template<> 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  
    1111#include "debug.h"
    1212#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
     17template<typename type> type fromLua(lua_State* state, int index);
    1718template<> bool fromLua<bool>(lua_State* state, int index);
    1819template<> int fromLua<int>(lua_State* state, int index);
     
    2324
    2425
    25 template<typename type> void toLua(lua_State* state, type value) { PRINTF(1)("NOT IMPLEMENTED\n"); };
     26template<typename type> void toLua(lua_State* state, type value);
    2627template<> void toLua<bool>(lua_State* state, bool value);
    2728template<> void toLua<int>(lua_State* state, int value);
Note: See TracChangeset for help on using the changeset viewer.