EasyLua  1.0
Lua API meta compiler for C++.
Static Public Member Functions | List of all members
EasyLua::Utilities Class Reference

This "namespace" contains a bulk of the EasyLua API that the end programmer should be concerned with. More...

#include <easylua.hpp>

Static Public Member Functions

template<typename... parameters>
static INLINE void pushParameters (lua_State *lua, const int &in, parameters...params)
 This is one among a family of methods that push arbitrary values to the Lua stack. More...
 
template<typename... parameters>
static INLINE void pushParameters (lua_State *lua, const float &in, parameters...params)
 This is one among a family of methods that push arbitrary values to the Lua stack. More...
 
template<typename... parameters>
static INLINE void pushParameters (lua_State *lua, const char *in, parameters...params)
 This is one among a family of methods that push arbitrary values to the Lua stack. More...
 
template<typename... parameters>
static INLINE void pushParameters (lua_State *lua, const bool &in, parameters...params)
 This is one among a family of methods that push arbitrary values to the Lua stack. More...
 
template<bool createTable = true, typename... parameters>
static INLINE void pushTable (lua_State *lua, const char *key, const int &value, parameters...params)
 This is one among a family of methods that push a table containing arbitrary values to the Lua stack. More...
 
template<bool createTable = true, typename... parameters>
static INLINE void pushTable (lua_State *lua, const char *key, const float &value, parameters...params)
 This is one among a family of methods that push a table containing arbitrary values to the Lua stack. More...
 
template<bool createTable = true, typename... parameters>
static INLINE void pushTable (lua_State *lua, const char *key, const double &value, parameters...params)
 This is one among a family of methods that push a table containing arbitrary values to the Lua stack. More...
 
template<bool createTable = true, typename... parameters>
static INLINE void * pushTable (lua_State *lua, const char *key, const bool &value, parameters...params)
 This is one among a family of methods that push a table containing arbitrary values to the Lua stack. More...
 
template<bool createTable = true, typename... parameters>
static INLINE void pushTable (lua_State *lua, const char *key, const char *value, parameters...params)
 This is one among a family of methods that push a table containing arbitrary values to the Lua stack. More...
 
template<typename... parameters>
static INLINE void pushTableComponents (lua_State *lua, parameters...params)
 A helper method that can be used to push more components to the current table. More...
 
template<typename... parameters>
static INLINE void * Table (lua_State *lua, parameters...params)
 
template<bool createTable = true, unsigned int index = 1, typename... parameters>
static INLINE void pushArray (lua_State *lua, const int &value, parameters...params)
 
template<bool createTable = true, unsigned int index = 1, typename... parameters>
static INLINE void pushArray (lua_State *lua, const char *key, const float &value, parameters...params)
 
template<bool createTable = true, unsigned int index = 1, typename... parameters>
static INLINE void pushArray (lua_State *lua, const char *key, const double &value, parameters...params)
 
template<bool createTable = true, unsigned int index = 1, typename... parameters>
static INLINE void pushArray (lua_State *lua, const char *key, const bool &value, parameters...params)
 
template<bool createTable = true, unsigned int index = 1, typename... parameters>
static INLINE void pushArray (lua_State *lua, const char *key, const char *value, parameters...params)
 
template<bool createTable = true, unsigned int index = 1>
static INLINE void pushArray (lua_State *lua)
 
template<bool typeException, int index = 1, typename... parameters>
static INLINE int readStack (lua_State *lua, float *out, parameters...params)
 
template<bool typeException, int index = 1, typename... parameters>
static INLINE int readStack (lua_State *lua, bool *out, parameters...params)
 
template<bool typeException, int index = 1, typename... parameters>
static INLINE int readStack (lua_State *lua, int *out, parameters...params)
 
template<bool typeException, int index = 1, typename... parameters>
static INLINE int readStack (lua_State *lua, char *out, const int &outLength, parameters...params)
 
template<bool typeException, int index = 1, typename... parameters>
static INLINE int readStack (lua_State *lua, std::string *out, parameters...params)
 
template<bool typeException, int index = 1, typename... parameters>
static INLINE int readStack (lua_State *lua, void *out, parameters...params)
 
static void printStack (lua_State *lua)
 
template<typename... parameters>
static INLINE void pushParameters (lua_State *lua, const void *value, parameters...params)
 This is one among a family of methods that push arbitrary values to the Lua stack. More...
 

Detailed Description

This "namespace" contains a bulk of the EasyLua API that the end programmer should be concerned with.

Note
This is actually a class with static methods because of the usage of recursive templates to resolve the Lua API calls.

Member Function Documentation

template<typename... parameters>
static INLINE void EasyLua::Utilities::pushParameters ( lua_State *  lua,
const int &  in,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push arbitrary values to the Lua stack.

Parameters
luaA pointer to the lua_State to use for this operation.
inThe current int to be pushing to the Lua stack.
paramsThe rest of the parameters to be pushing to the Lua stack.
template<typename... parameters>
static INLINE void EasyLua::Utilities::pushParameters ( lua_State *  lua,
const float &  in,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push arbitrary values to the Lua stack.

Parameters
luaA pointer to the lua_State to use for this operation.
inThe current float to be pushing to the Lua stack.
paramsThe rest of the parameters to be pushing to the Lua stack.
template<typename... parameters>
static INLINE void EasyLua::Utilities::pushParameters ( lua_State *  lua,
const char *  in,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push arbitrary values to the Lua stack.

Parameters
luaA pointer to the lua_State to use for this operation.
inThe current string to be pushing to the Lua stack.
paramsThe rest of the parameters to be pushing to the Lua stack.
template<typename... parameters>
static INLINE void EasyLua::Utilities::pushParameters ( lua_State *  lua,
const bool &  in,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push arbitrary values to the Lua stack.

Parameters
luaA pointer to the lua_State to use for this operation.
inThe current bool to be pushing to the Lua stack.
paramsThe rest of the parameters to be pushing to the Lua stack.
template<typename... parameters>
static INLINE void EasyLua::Utilities::pushParameters ( lua_State *  lua,
const void *  value,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push arbitrary values to the Lua stack.

Parameters
luaA pointer to the lua_State to use for this operation.
inThis value is actually not used.
paramsThe rest of the parameters to be pushing to the Lua stack.
Note
The end programmer should not be using this method directly.
template<bool createTable = true, typename... parameters>
static INLINE void EasyLua::Utilities::pushTable ( lua_State *  lua,
const char *  key,
const int &  value,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push a table containing arbitrary values to the Lua stack.

Parameters
keyThe key to assign the value to so that { key = value }
valueThe int value to assign to our key in the table.
luaA pointer to the lua_State to use for this operation.
template<bool createTable = true, typename... parameters>
static INLINE void EasyLua::Utilities::pushTable ( lua_State *  lua,
const char *  key,
const float &  value,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push a table containing arbitrary values to the Lua stack.

Parameters
keyThe key to assign the value to so that { key = value }
valueThe float value to assign to our key in the table.
luaA pointer to the lua_State to use for this operation.
template<bool createTable = true, typename... parameters>
static INLINE void EasyLua::Utilities::pushTable ( lua_State *  lua,
const char *  key,
const double &  value,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push a table containing arbitrary values to the Lua stack.

Parameters
keyThe key to assign the value to so that { key = value }
valueThe double value to assign to our key in the table.
luaA pointer to the lua_State to use for this operation.
Note
The double is probably downcasted to a float for this operation.
template<bool createTable = true, typename... parameters>
static INLINE void* EasyLua::Utilities::pushTable ( lua_State *  lua,
const char *  key,
const bool &  value,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push a table containing arbitrary values to the Lua stack.

Parameters
keyThe key to assign the value to so that { key = value }
valueThe bool value to assign to our key in the table.
luaA pointer to the lua_State to use for this operation.
template<bool createTable = true, typename... parameters>
static INLINE void EasyLua::Utilities::pushTable ( lua_State *  lua,
const char *  key,
const char *  value,
parameters...  params 
)
inlinestatic

This is one among a family of methods that push a table containing arbitrary values to the Lua stack.

Parameters
keyThe key to assign the value to so that { key = value }
valueThe string value to assign to our key in the table.
luaA pointer to the lua_State to use for this operation.
template<typename... parameters>
static INLINE void EasyLua::Utilities::pushTableComponents ( lua_State *  lua,
parameters...  params 
)
inlinestatic

A helper method that can be used to push more components to the current table.

Parameters
keyThe key to assign the value to so that { key = value }
valueThe string value to assign to our key in the table.
luaA pointer to the lua_State to use for this operation.
Note
This simply calls EasyLua::Utilities::pushTable<false>(lua, params...)

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