Go to the documentation of this file.
32 #if !defined(LUTOK_STATE_HPP)
33 #define LUTOK_STATE_HPP
37 #if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
55 typedef int (*cxx_function)(
state&);
80 #if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
81 std::shared_ptr< impl >
_pimpl;
90 explicit state(
void*);
116 bool next(
const int);
121 void pcall(
const int,
const int,
const int);
137 template<
typename Type > Type*
to_userdata(
const int);
145 #endif // !defined(LUTOK_STATE_HPP)
bool is_function(const int)
Wrapper around lua_isfunction.
Definition: state.cpp:418
bool get_metafield(const int, const std::string &)
Wrapper around luaL_getmetafield.
Definition: state.cpp:341
int upvalue_index(const int)
Wrapper around lua_upvalueindex.
Definition: state.cpp:888
bool get_metatable(const int)
Wrapper around lua_getmetatable.
Definition: state.cpp:353
int get_top(void)
Wrapper around lua_gettop.
Definition: state.cpp:384
void pcall(const int, const int, const int)
Wrapper around lua_pcall.
Definition: state.cpp:643
bool to_boolean(const int)
Wrapper around lua_toboolean.
Definition: state.cpp:825
void open_table(void)
Wrapper around luaopen_table.
Definition: state.cpp:622
state(void)
Initializes the Lua state.
Definition: state.cpp:242
void new_table(void)
Wrapper around lua_newtable.
Definition: state.cpp:521
void open_string(void)
Wrapper around luaopen_string.
Definition: state.cpp:603
void push_nil(void)
Wrapper around lua_pushnil.
Definition: state.cpp:717
void push_cxx_function(cxx_function)
Wrapper around lua_pushcfunction.
Definition: state.cpp:696
Type * new_userdata(void)
Wrapper around lua_newuserdata.
Definition: state.ipp:46
void raw_set(const int)
Wrapper around lua_rawset.
Definition: state.cpp:762
void push_string(const std::string &)
Wrapper around lua_pushstring.
Definition: state.cpp:729
Type * to_userdata(const int)
Wrapper around lua_touserdata.
Definition: state.ipp:59
void load_string(const std::string &)
Wrapper around luaL_loadstring.
Definition: state.cpp:510
const int registry_index
Stack index constant pointing to the registry table.
Definition: state.cpp:215
Gateway to the raw C state of Lua.
Definition: c_gate.hpp:55
void insert(const int)
Wrapper around lua_insert.
Definition: state.cpp:394
void push_boolean(const bool)
Wrapper around lua_pushboolean.
Definition: state.cpp:666
void open_all(void)
Wrapper around luaL_openlibs.
Definition: state.cpp:577
void raw_get(const int)
Wrapper around lua_rawget.
Definition: state.cpp:749
void load_file(const std::string &)
Wrapper around luaL_loadfile.
Definition: state.cpp:493
void * to_userdata_voidp(const int)
Wrapper around lua_touserdata.
Definition: state.cpp:856
void push_value(const int)
Wrapper around lua_pushvalue.
Definition: state.cpp:739
void pop(const int)
Wrapper around lua_pop.
Definition: state.cpp:654
void get_table(const int)
Wrapper around lua_gettable.
Definition: state.cpp:368
void set_table(const int)
Wrapper around lua_settable.
Definition: state.cpp:807
std::tr1::shared_ptr< impl > _pimpl
Pointer to the shared internal implementation.
Definition: state.hpp:77
void * raw_state(void)
Gets the internal lua_State object.
Definition: state.cpp:901
bool is_string(const int)
Wrapper around lua_isstring.
Definition: state.cpp:454
bool is_number(const int)
Wrapper around lua_isnumber.
Definition: state.cpp:442
bool is_table(const int)
Wrapper around lua_istable.
Definition: state.cpp:466
A RAII model for the Lua state.
Definition: state.hpp:76
void get_global(const std::string &)
Wrapper around lua_getglobal.
Definition: state.cpp:302
std::string to_string(const int)
Wrapper around lua_tostring.
Definition: state.cpp:871
void get_global_table(void)
Pushes a reference to the global table onto the stack.
Definition: state.cpp:318
void open_base(void)
Wrapper around luaopen_base.
Definition: state.cpp:589
Internal implementation for lutok::state.
Definition: state.cpp:219
void set_metatable(const int)
Wrapper around lua_setmetatable.
Definition: state.cpp:792
void * new_userdata_voidp(const size_t)
Wrapper around lua_newuserdata.
Definition: state.cpp:538
bool is_nil(const int)
Wrapper around lua_isnil.
Definition: state.cpp:430
bool is_boolean(const int)
Wrapper around lua_isboolean.
Definition: state.cpp:406
bool is_userdata(const int)
Wrapper around lua_isuserdata.
Definition: state.cpp:478
long to_integer(const int)
Wrapper around lua_tointeger.
Definition: state.cpp:838
void close(void)
Terminates this Lua session.
Definition: state.cpp:284
void set_global(const std::string &)
Wrapper around lua_setglobal.
Definition: state.cpp:777
~state(void)
Destructor for the Lua state.
Definition: state.cpp:268
bool next(const int)
Wrapper around lua_next.
Definition: state.cpp:552
void push_integer(const int)
Wrapper around lua_pushinteger.
Definition: state.cpp:709
void push_cxx_closure(cxx_function, const int)
Wrapper around lua_pushcclosure.
Definition: state.cpp:680