Changeset 9747 in orxonox.OLD for branches/new_class_id/src/lib/util/executor/executor_lua_state.h
- Timestamp:
- Sep 16, 2006, 9:35:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/executor/executor_lua_state.h
r9746 r9747 26 26 27 27 #include "executor_generic.h" 28 28 29 #include "luaincl.h" 30 29 31 #ifdef FUNCTOR_CALL_TYPE 30 32 #undef FUNCTOR_CALL_TYPE … … 49 51 template<> void toLua<const std::string&>(lua_State* state, const std::string& value); 50 52 51 /** 52 * @brief to remove writing errors, this function is Used. 53 * @param sub The SubString to use 54 * @param default The default Values. 55 */ 53 //! A Class, that evaluates a lua_State and converts indices into different Types. 56 54 template<> class ExecutorEvaluater <lua_State*> 57 55 { … … 62 60 */ 63 61 template <typename ToType, int index> 64 ToType operator()(lua_State*& CallValue, const MultiType* const defaults)62 static ToType getValue(lua_State*& CallValue, const MultiType* const defaults) 65 63 { 66 return (fromLua<ToType>(CallValue, index ));64 return (fromLua<ToType>(CallValue, index+1)); 67 65 } 68 template <typename ToType>69 void storeRet(lua_State*& state, ToType value)66 template <typename FromType> 67 static void storeRet(lua_State*& state, FromType value) 70 68 { 71 toLua< ToType>(state, value);69 toLua<FromType>(state, value); 72 70 } 73 71 static lua_State*& defaultValue() { static lua_State* nullState; return nullState; };
Note: See TracChangeset
for help on using the changeset viewer.