#include <LuaState.hpp>
Public Member Functions | |
| LuaState (bool loadStdLib=true) | |
| LuaState (lua_State *state, bool loadStdLib=false) | |
| virtual | ~LuaState () |
| LuaValueList | doFile (const std::string &fileName) |
| LuaValueList | doString (const std::string &what) |
| LuaVariable | operator[] (const std::string &variable) |
| lua_State * | getState () |
Returns the encapsulated lua_State*. | |
Private Member Functions | |
| LuaValueList | doStringOrFile (bool isString, const std::string &str) |
| void | throwOnLuaError (int retCode) |
Private Attributes | |
| lua_State * | state_ |
The underlying lua_State*. | |
| const bool | ownsState_ |
LuaState: The Next Generation. The pleasant way to do perform relevant operations on a Lua state.
(My previous implementation of a class named LuaState was pretty low-level. It was essentially a C++ wrapper around a lua_State*, without higher level operations. This is an attempt to allow me to do the kind of things I do most of the time without much effort.)
Definition at line 50 of file LuaState.hpp.
|
|
Constructs a
|
|
||||||||||||
|
Constructs a
|
|
|
Destructs a |
|
|
Executes the file passed as parameter and returns all the values returned by this execution. Notice that when a
Definition at line 91 of file LuaState.hpp. References doStringOrFile(). |
|
|
Executes the string passed as parameter and returns all the values returned by this execution. Notice that when a
Definition at line 105 of file LuaState.hpp. References doStringOrFile(). |
|
||||||||||||
|
Since The implementation of
Referenced by doFile(), and doString(). |
|
|
Returns the encapsulated
Definition at line 121 of file LuaState.hpp. References state_. |
|
|
Returns a
|
|
|
Throws an exception if the number passed as parameter corresponds to an error code from a function from the Lua API. The exception thrown is of the proper type, that is, of the subclass of If the number passed as parameter is 0 (which is the code for "no error"), the function does nothing.
|
|
|
Does this Definition at line 146 of file LuaState.hpp. |
|
|
The underlying
Definition at line 141 of file LuaState.hpp. Referenced by getState(). |
1.4.6