SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
ai::lua::LUA Class Reference

#include <LUA.h>

Inheritance diagram for ai::lua::LUA:
[legend]
Collaboration diagram for ai::lua::LUA:
[legend]

Public Member Functions

 LUA (lua_State *state)
 
 LUA (bool debug=false)
 
lua_State * getState () const
 
template<class T >
T * newGlobalData (const std::string &prefix, T *userData) const
 
void reg (const std::string &prefix, luaL_Reg *funcs)
 
LUAType registerType (const std::string &name)
 
void setError (const std::string &errorStr)
 
const std::string & error () const
 
bool load (const std::string &luaString)
 
bool load (const char *luaString, size_t len)
 
bool execute (const std::string &function, int returnValues=0)
 

Static Public Member Functions

template<class T >
static T * getGlobalData (lua_State *L, const std::string &prefix)
 
template<class T >
static T * newUserdata (lua_State *L, const std::string &prefix, T *data)
 
template<class T >
static T * getUserData (lua_State *L, int n, const std::string &prefix)
 
static int returnError (lua_State *L, const std::string &error)
 

Detailed Description

You can find the reference lua manual at http://www.lua.org/manual/5.3/
-1 and -2 are pseudo indexes, they count backwards:
  • -1 is top
  • 1 is bottom
  • -2 is under the top

Member Function Documentation

bool ai::lua::LUA::execute ( const std::string &  function,
int  returnValues = 0 
)
inline
Parameters
[in]functionfunction to be called

The documentation for this class was generated from the following file: