Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 16, 2006, 9:35:30 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: Indexing works again for all the Scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/util/executor/executor_lua_state.h

    r9746 r9747  
    2626
    2727#include "executor_generic.h"
     28
    2829#include "luaincl.h"
     30
    2931#ifdef FUNCTOR_CALL_TYPE
    3032 #undef FUNCTOR_CALL_TYPE
     
    4951template<> void toLua<const std::string&>(lua_State* state, const std::string& value);
    5052
    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.
    5654template<> class ExecutorEvaluater <lua_State*>
    5755{
     
    6260   */
    6361  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)
    6563  {
    66     return (fromLua<ToType>(CallValue, index));
     64    return (fromLua<ToType>(CallValue, index+1));
    6765  }
    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)
    7068  {
    71     toLua<ToType>(state, value);
     69    toLua<FromType>(state, value);
    7270  }
    7371  static lua_State*& defaultValue() { static lua_State* nullState; return nullState; };
Note: See TracChangeset for help on using the changeset viewer.