37 #include <type_traits>
43 std::string type_name()
45 typedef typename std::remove_reference<T>::type TR;
46 std::unique_ptr<char, void(*)(
void*)> own
48 abi::__cxa_demangle(
typeid(TR).
name(),
nullptr,
52 std::string r = own !=
nullptr ? own.get() :
typeid(TR).
name();
53 if (std::is_const<TR>::value)
55 if (std::is_volatile<TR>::value)
57 if (std::is_lvalue_reference<T>::value)
59 else if (std::is_rvalue_reference<T>::value)
68 #define KEYEND "\"] = "
71 #define KEYEND "\" : "
74 #define CLASSDOC(TYPE, LUANAME, DECL, PARENTDECL) \
75 if (LuaBindingDoc::printBindings ()) { \
76 std::cout << "{ " << KEYSTA << "type" << KEYEND << " \"" << TYPE << "\",\n"; \
77 std::cout << " " << KEYSTA << "lua" << KEYEND << " \"" << LUANAME << "\",\n"; \
78 std::cout << " " << KEYSTA << "decl" << KEYEND << " \"" << DECL << "\",\n"; \
79 std::cout << " " << KEYSTA << "parent" << KEYEND << "\"" << PARENTDECL << "\"\n"; \
80 std::cout << "},\n"; \
83 #define PRINTDOC(TYPE, LUANAME, RETVAL, DECL) \
84 if (LuaBindingDoc::printBindings ()) { \
85 std::cout << "{ " << KEYSTA << "type" << KEYEND << " \"" << TYPE << "\",\n"; \
86 std::cout << " " << KEYSTA << "lua" << KEYEND << " \"" << LUANAME << "\",\n"; \
87 if (!(RETVAL).empty()) { \
88 std::cout << " " << KEYSTA << "ret" << KEYEND << " \"" << (RETVAL) << "\",\n"; \
90 std::cout << " " << KEYSTA << "decl" << KEYEND << " \"" << DECL << "\"\n"; \
91 std::cout << "},\n"; \
94 #define FUNDOC(TYPE, NAME, FUNCTOR) \
95 PRINTDOC(TYPE, _name << NAME, \
96 type_name< typename FuncTraits <FUNCTOR>::ReturnType >(), \
97 type_name< typename FuncTraits <FUNCTOR>::DeclType >())
99 #define DATADOC(TYPE, NAME, FUNCTOR) \
100 PRINTDOC(TYPE, _name << NAME, \
102 type_name< decltype(FUNCTOR) >())\
107 #define CLASSDOC(TYPE, LUANAME, DECL, PARENTDECL)
108 #define PRINTDOC(TYPE, LUANAME, RETVAL, DECL)
109 #define FUNDOC(TYPE, NAME, FUNCTOR)
110 #define DATADOC(TYPE, NAME, FUNCTOR)
135 static int luaError (
lua_State*
L, std::string message)
176 throw std::logic_error (
"invalid stack");
235 throw std::logic_error (
"not a cfunction");
261 throw std::logic_error (
"not a cfunction");
269 throw std::logic_error (
"missing __propget table");
289 throw std::logic_error (
"__parent is not a table");
365 if (Security::hideMetatables ())
402 if (Security::hideMetatables ())
444 if (Security::hideMetatables ())
455 template <
class Params,
class C>
469 template <
class Params,
class T>
477 template <
class Params,
class T,
class C>
507 throw std::logic_error (
"invalid stack");
527 , _name (other._name)
528 , _parent (other._parent)
567 _name = parent->_name +
name +
":";
569 PRINTDOC (
"[C] Class", parent->_name <<
name, std::string(), type_name <T>())
624 _name = parent->_name +
name +
":";
716 Class <T>& addStaticProperty (
char const*
name, U (*get)(),
void (*set)(U) = 0)
718 typedef U (*get_t)();
719 typedef void (*set_t)(U);
830 typedef const U T::*mp_t;
862 template <
class TG,
class TS>
870 typedef TG (T::*get_t) ()
const;
883 typedef bool (T::* set_t) (TS);
901 typedef TG (T::*get_t) ()
const;
924 template <
class TG,
class TS>
931 typedef TG (*get_t) (T
const*);
945 typedef void (*set_t) (T*, TS);
957 template <
class TG,
class TS>
963 typedef TG (*get_t) (T
const*);
978 template <
class MemFn>
986 template <
class MemFn>
989 FUNDOC(
"Member Pointer Function",
name, MemFn)
994 template <
class MemFn>
997 FUNDOC(
"Member Weak Pointer Function",
name, MemFn)
1002 template <
class MemFn>
1005 FUNDOC(
"Member Function RefReturn",
name, MemFn)
1047 typedef int (T::*MFP)(
lua_State*)
const;
1061 template <
typename U>
1092 template <
class MemFn,
class C>
1095 FUNDOC(
"Constructor",
"", MemFn)
1103 template <
class MemFn>
1106 FUNDOC(
"Constructor",
"", MemFn)
1114 template <
class MemFn,
class PT>
1117 FUNDOC(
"Constructor",
"", MemFn)
1127 return addConstructor <void (*) ()> ();
1133 return addPtrConstructor <void (*) (), PT> ();
1149 type_name< U >() <<
" (" << type_name< T >() <<
"::*)()")
1163 template <
typename T>
1169 #ifdef LUABINDINGDOC
1171 _name = parent->_name +
name +
":";
1174 std::string(), type_name <T>() +
"*")
1175 PRINTDOC (
"Ext C Function", _name <<
"array",
1176 std::string(
""),
"int (*)(lua_State*)")
1177 PRINTDOC (
"Ext C Function", _name <<
"get_table",
1178 std::string(
""),
"int (*)(lua_State*)")
1179 PRINTDOC (
"Ext C Function", _name <<
"set_table",
1180 std::string(
""),
"int (*)(lua_State*)")
1181 PRINTDOC(
"Member Function", _name <<
"offset",
1182 std::string(type_name <T>() +
"*"), std::string(type_name <T>() +
"* (*)(unsigned int)"))
1211 if (Security::hideMetatables ())
1282 #ifdef LUABINDINGDOC
1284 _name = parent->_name +
name +
":";
1286 PRINTDOC (
"[C] Weak/Shared Pointer Class",
1287 parent->_name +
name,
1288 std::string(), type_name <T>())
1294 WSPtrClass (
char const*
name,
Namespace const* parent,
void const*
const sharedkey,
void const*
const sharedconstkey,
void const*
const weakkey)
1300 #ifdef LUABINDINGDOC
1302 _name = parent->_name +
name +
":";
1309 template <
class MemFn>
1312 FUNDOC (
"Weak/Shared Pointer Function",
name, MemFn)
1324 template <
class MemFn>
1327 FUNDOC (
"Weak/Shared Pointer Function RefReturn",
name, MemFn)
1339 template <
class MemFn>
1342 FUNDOC (
"Weak/Shared Pointer Constructor",
"", MemFn)
1364 return addConstructor <void (*) ()> ();
1390 FUNDOC (
"Weak/Shared Pointer NIL Constructor",
"",
void (*) ())
1443 type_name< U >() <<
" (" << type_name< T >() <<
"::*)()")
1461 PRINTDOC(
"Weak/Shared Null Check", _name <<
"isnil", std::string(
"bool"), std::string(
"void (*)()"))
1504 typedef const U T::*mp_t;
1619 #ifdef LUABINDINGDOC
1628 #ifdef LUABINDINGDOC
1643 #ifdef LUABINDINGDOC
1644 , _name (parent->_name +
name +
":")
1674 if (Security::hideMetatables ())
1690 #ifdef LUABINDINGDOC
1691 , _name (child->_parent ? child->_parent->_name :
"")
1692 , _parent (child->_parent ? child->_parent->_parent : NULL)
1712 #ifdef LUABINDINGDOC
1713 , _name (child->_parent ? child->_parent->_name :
"")
1714 , _parent (child->_parent ? child->_parent->_parent : NULL)
1735 #ifdef LUABINDINGDOC
1736 _name = other._name;
1737 _parent = other._parent;
1813 template <
typename U>
1840 template <
class TG,
class TS>
1841 Namespace& addProperty (
char const*
name, TG (*get) (),
void (*set)(TS) = 0)
1847 typedef TG (*get_t) ();
1857 typedef void (*set_t) (TS);
1908 template <
typename T>
1949 template <
class K,
class V>
1952 typedef std::map<K, V> LT;
1953 typedef std::pair<const K, V> T;
1955 typedef typename std::map<K, V>::size_type T_SIZE;
1957 return beginClass<LT> (
name)
1958 .addVoidConstructor ()
1959 .addFunction (
"empty", (
bool (LT::*)()
const)<::empty)
1960 .addFunction (
"size", (T_SIZE (LT::*)()
const)<::size)
1961 .addFunction (
"clear", (
void (LT::*)())<::clear)
1962 .addFunction (
"count", (T_SIZE (LT::*)(
const K&)
const)<::count)
1963 .addExtCFunction (
"add", &CFunc::tableToMap<K, V>)
1964 .addExtCFunction (
"iter", &CFunc::mapIter<K, V>)
1965 .addExtCFunction (
"table", &CFunc::mapToTable<K, V>)
1966 .addExtCFunction (
"at", &CFunc::mapAt<K, V>);
1972 typedef std::set<T> LT;
1973 typedef typename LT::size_type T_SIZE;
1974 return beginClass<LT> (
name)
1975 .addVoidConstructor ()
1976 .addFunction (
"clear", (
void (LT::*)())<::clear)
1977 .addFunction (
"empty", (
bool (LT::*)()
const)<::empty)
1978 .addFunction (
"size", (T_SIZE (LT::*)()
const)<::size)
1980 .addExtCFunction (
"insert", &CFunc::setInsert<T, LT>)
1982 .addExtCFunction (
"iter", &CFunc::setIter<T, LT>)
1983 .addExtCFunction (
"table", &CFunc::setToTable<T, LT>);
1986 template <
unsigned int T>
1989 typedef std::bitset<T> BS;
1990 return beginClass<BS> (
name)
1991 .addVoidConstructor ()
1992 .addFunction (
"reset", (BS& (BS::*)())&
BS::reset)
1993 .addFunction (
"set", (BS& (BS::*)(
size_t,
bool))&BS::set)
1994 .addFunction (
"count", (
size_t (BS::*)()
const)&BS::count)
1995 .addFunction (
"size", (
size_t (BS::*)()
const)&BS::size)
1996 .addFunction (
"any", (
bool (BS::*)()
const)&
BS::any)
1997 .addFunction (
"none", (
bool (BS::*)()
const)&
BS::none)
1998 .addFunction (
"test", &BS::test)
1999 .addExtCFunction (
"add", &CFunc::tableToBitSet<T>)
2000 .addExtCFunction (
"table", &CFunc::bitSetToTable<T>);
2006 typedef std::list<T> LT;
2007 typedef typename LT::size_type T_SIZE;
2008 return beginClass<LT> (
name)
2009 .addVoidConstructor ()
2010 .addFunction (
"empty",
static_cast<bool (LT::*)() const
>(<::empty))
2011 .addFunction (
"size",
static_cast<T_SIZE (LT::*)() const
>(<::size))
2012 .addFunction (
"reverse",
static_cast<void (LT::*)()
>(<::reverse))
2013 .addFunction (
"front",
static_cast<T& (LT::*)()
>(<::front))
2014 .addFunction (
"back",
static_cast<T& (LT::*)()
>(<::back))
2015 .addExtCFunction (
"iter", &CFunc::listIter<T, LT>)
2016 .addExtCFunction (
"table", &CFunc::listToTable<T, LT>);
2022 typedef std::list<T> LT;
2023 typedef typename LT::size_type T_SIZE;
2024 return beginConstStdList<T> (
name)
2025 #if !defined(_MSC_VER) || (_MSC_VER < 1900)
2027 # if (defined(__cplusplus) && __cplusplus >= 201709L)
2028 .addFunction (
"unique", (T_SIZE (LT::*)())<::unique)
2030 .addFunction (
"unique", (
void (LT::*)())<::unique)
2033 .addFunction (
"clear", (
void (LT::*)())<::clear)
2034 .addFunction (
"push_back", (
void (LT::*)(
const T&))<::push_back)
2035 .addExtCFunction (
"add", &CFunc::tableToList<T, LT>);
2042 typedef std::list<TP> LT;
2043 typedef typename LT::size_type T_SIZE;
2044 return beginClass<LT> (
name)
2045 .addVoidConstructor ()
2046 .addFunction (
"empty",
static_cast<bool (LT::*)() const
>(<::empty))
2047 .addFunction (
"size",
static_cast<T_SIZE (LT::*)() const
>(<::size))
2048 .addFunction (
"reverse",
static_cast<void (LT::*)()
>(<::reverse))
2049 .addFunction (
"front",
static_cast<const TP& (LT::*)() const
>(<::front))
2050 .addFunction (
"back",
static_cast<const TP& (LT::*)() const
>(<::back))
2051 .addExtCFunction (
"iter", &CFunc::listIter<T*, LT>)
2052 .addExtCFunction (
"table", &CFunc::listToTable<T*, LT>);
2059 typedef std::list<TP> LT;
2060 typedef typename LT::size_type T_SIZE;
2061 return beginConstStdCPtrList<T> (
name)
2062 #if !defined(_MSC_VER) || (_MSC_VER < 1900)
2064 # if (defined(__cplusplus) && __cplusplus >= 201709L)
2065 .addFunction (
"unique", (T_SIZE (LT::*)())<::unique)
2067 .addFunction (
"unique", (
void (LT::*)())<::unique)
2070 .addFunction (
"clear", (
void (LT::*)())<::clear)
2071 .addExtCFunction (
"push_back", &CFunc::pushbackptr<T, LT>);
2078 typedef std::vector<T> LT;
2079 typedef typename std::vector<T>::reference T_REF;
2080 typedef typename std::vector<T>::size_type T_SIZE;
2082 return beginClass<LT> (
name)
2083 .addVoidConstructor ()
2084 .addFunction (
"empty", (
bool (LT::*)()
const)<::empty)
2085 .addFunction (
"size", (T_SIZE (LT::*)()
const)<::size)
2086 .addFunction (
"at", (T_REF (LT::*)(T_SIZE))<::at)
2087 .addExtCFunction (
"iter", &CFunc::listIter<T, LT>)
2088 .addExtCFunction (
"table", &CFunc::listToTable<T, LT>);
2094 typedef std::vector<T> LT;
2095 typedef typename std::vector<T>::size_type T_SIZE;
2096 return beginConstStdVector<T> (
name)
2097 .addVoidConstructor ()
2098 .addFunction (
"push_back", (
void (LT::*)(
const T&))<::push_back)
2099 .addFunction (
"clear", (
void (LT::*)())<::clear)
2100 .addFunction (
"reserve", (
void (LT::*)(T_SIZE))<::reserve)
2101 .addExtCFunction (
"to_array", &CFunc::vectorToArray<T, LT>)
2102 .addExtCFunction (
"add", &CFunc::tableToList<T, LT>);
2110 typedef std::list<T>
const LT;
2111 typedef typename LT::size_type T_SIZE;
2112 return beginClass<std::shared_ptr<LT> > (
name)
2113 .addPtrFunction (
"empty", (
bool (LT::*)()
const)<::empty)
2114 .addPtrFunction (
"size", (T_SIZE (LT::*)()
const)<::size)
2115 .addPtrFunction (
"reverse", (
void (LT::*)())<::reverse)
2116 .addExtCFunction (
"iter", &CFunc::ptrListIter<T, LT>)
2117 .addExtCFunction (
"table", &CFunc::ptrListToTable<T, LT>);
2123 typedef std::list<T> LT;
2124 typedef typename LT::size_type T_SIZE;
2125 return beginClass<std::shared_ptr<LT> > (
name)
2127 .addPtrFunction (
"empty", (
bool (LT::*)()
const)<::empty)
2128 .addPtrFunction (
"size", (T_SIZE (LT::*)()
const)<::size)
2129 .addPtrFunction (
"reverse", (
void (LT::*)())<::reverse)
2130 #
if !defined(_MSC_VER) || (_MSC_VER < 1900)
2132 #
if (defined(__cplusplus) && __cplusplus >= 201709L)
2133 .addPtrFunction (
"unique", (T_SIZE (LT::*)())<::unique)
2135 .addPtrFunction (
"unique", (
void (LT::*)())<::unique)
2138 .addPtrFunction (
"clear", (
void (LT::*)())<::clear)
2139 .addPtrFunction (
"push_back", (
void (LT::*)(
const T&))<::push_back)
2140 .addExtCFunction (
"add", &CFunc::ptrTableToList<T, LT>)
2141 .addExtCFunction (
"iter", &CFunc::ptrListIter<T, LT>)
2142 .addExtCFunction (
"table", &CFunc::ptrListToTable<T, LT>);
2148 typedef std::vector<T>
const LT;
2149 typedef typename std::vector<T>::reference T_REF;
2150 typedef typename std::vector<T>::size_type T_SIZE;
2152 return beginClass<std::shared_ptr<LT> > (
name)
2153 .addPtrFunction (
"empty", (
bool (LT::*)()
const)<::empty)
2154 .addPtrFunction (
"size", (T_SIZE (LT::*)()
const)<::size)
2155 .addPtrFunction (
"at", (T_REF (LT::*)(T_SIZE))<::at)
2156 .addExtCFunction (
"iter", &CFunc::ptrListIter<T, LT>)
2157 .addExtCFunction (
"table", &CFunc::ptrListToTable<T, LT>);
2163 typedef std::vector<T> LT;
2164 typedef typename std::vector<T>::reference T_REF;
2165 typedef typename std::vector<T>::size_type T_SIZE;
2167 return beginClass<std::shared_ptr<LT> > (
name)
2169 .addPtrFunction (
"empty", (
bool (LT::*)()
const)<::empty)
2170 .addPtrFunction (
"size", (T_SIZE (LT::*)()
const)<::size)
2171 .addPtrFunction (
"clear", (
void (LT::*)())<::clear)
2172 .addPtrFunction (
"push_back", (
void (LT::*)(
const T&))<::push_back)
2173 .addPtrFunction (
"at", (T_REF (LT::*)(T_SIZE))<::at)
2174 .addExtCFunction (
"add", &CFunc::ptrTableToList<T, LT>)
2175 .addExtCFunction (
"iter", &CFunc::ptrListIter<T, LT>)
2176 .addExtCFunction (
"table", &CFunc::ptrListToTable<T, LT>);
2186 template <
class T,
class U>
2189 CLASSDOC (
"[C] Derived Class", _name <<
name, type_name <T>(), type_name <U>())
2193 template <
class T,
class U>
2197 CLASSDOC (
"[C] Derived Class", _name <<
name, type_name <std::shared_ptr<T> >(), type_name <std::shared_ptr<U> >())
2198 CLASSDOC (
"[C] Derived Class", _name <<
name, type_name <std::weak_ptr<T> >(), type_name <std::weak_ptr<U> >())
2199 CLASSDOC (
"[C] Derived Pointer Class", _name <<
name, type_name <T>(), type_name <U>())
2201 ClassInfo <std::shared_ptr<U> >::getStaticKey (),
2202 ClassInfo <std::shared_ptr<U const> >::getStaticKey (),
2203 ClassInfo <std::weak_ptr<U> >::getStaticKey ())
void rawsetfield(lua_State *L, int index, char const *key)
void rawgetfield(lua_State *L, int index, char const *key)
#define DATADOC(TYPE, NAME, FUNCTOR)
#define PRINTDOC(TYPE, LUANAME, RETVAL, DECL)
#define CLASSDOC(TYPE, LUANAME, DECL, PARENTDECL)
#define FUNDOC(TYPE, NAME, FUNCTOR)
Namespace getGlobalNamespace(lua_State *L)
Array(char const *name, Namespace const *parent)
static int ctorPlacementProxy(lua_State *L)
void createStaticTable(char const *name)
static int ctorNilPtrPlacementProxy(lua_State *L)
static int newindexMetaMethod(lua_State *L)
void createClassTable(char const *name)
static int indexMetaMethod(lua_State *L)
static int ctorPtrPlacementProxy(lua_State *L)
static int ctorContainerProxy(lua_State *L)
void createConstTable(char const *name)
ClassBase(ClassBase const &other)
ClassBase & operator=(ClassBase const &other)
Class< T > & addConstructor()
Class< T > & addExtCFunction(char const *name, int(*const fp)(lua_State *))
Class< T > & addStaticCFunction(char const *name, int(*const fp)(lua_State *))
Class< T > & addStaticFunction(char const *name, FP const fp)
Class< T > & addWPtrFunction(char const *name, MemFn mf)
Class< T > & addVoidPtrConstructor()
Class< T > & addData(char const *name, const U T::*mp, bool isWritable=true)
Class< T > & addEqualCheck()
Class< T > & addCast(char const *name)
Class< T > & addStaticData(char const *name, U *pu, bool isWritable=true)
Class(char const *name, Namespace const *parent)
Class< T > & addPtrConstructor()
Class< T > & addFunction(char const *name, MemFn mf)
Class< T > & addCFunction(char const *name, int(T::*mfp)(lua_State *) const)
Class< T > & addRefFunction(char const *name, MemFn mf)
Class< T > & addMetamethod(char const *name, FP const fp)
Class< T > & addConstructor()
Class(char const *name, Namespace const *parent, void const *const staticKey)
Class< T > & addVoidConstructor()
Class< T > & addProperty(char const *name, TG(T::*get)() const, bool(T::*set)(TS))
Class< T > & addProperty(char const *name, TG(*get)(T const *), bool(*set)(T *, TS))
Class< T > & addOperator(char const *name, int(*const fp)(lua_State *))
Class< T > & addConst(char const *name, const U val)
Class< T > & addPtrFunction(char const *name, MemFn mf)
Class< T > & addCFunction(char const *name, int(T::*mfp)(lua_State *))
WSPtrClass< T > & addNullCheck()
Class< std::weak_ptr< T > > weak
Class< std::shared_ptr< T const > > shared_const
WSPtrClass< T > & addNilPtrConstructor()
WSPtrClass< T > & addEqualCheck()
WSPtrClass< T > & addStaticFunction(char const *name, FP const fp)
WSPtrClass(char const *name, Namespace const *parent, void const *const sharedkey, void const *const sharedconstkey, void const *const weakkey)
Class< std::shared_ptr< T > > shared
WSPtrClass< T > & addCast(char const *name)
WSPtrClass(char const *name, Namespace const *parent)
WSPtrClass< T > & addData(char const *name, const U T::*mp, bool isWritable=true)
WSPtrClass< T > & addFunction(char const *name, MemFn mf)
WSPtrClass< T > & addRefFunction(char const *name, MemFn mf)
void set_const_shared_class()
WSPtrClass< T > & addExtCFunction(char const *name, int(*const fp)(lua_State *))
WSPtrClass< T > & addConstructor()
WSPtrClass< T > & addVoidConstructor()
Namespace(ClassBase const *child)
Class< std::set< T > > beginStdSet(char const *name)
Class< T > beginClass(char const *name)
Namespace & addCFunction(char const *name, int(*const fp)(lua_State *))
Class< T > deriveClass(char const *name)
WSPtrClass< T > beginWSPtrClass(char const *name)
Class< std::shared_ptr< std::list< T > > > beginPtrStdList(char const *name)
Namespace beginNamespace(char const *name)
Class< std::shared_ptr< std::vector< T > > > beginPtrStdVector(char const *name)
Namespace & addRefFunction(char const *name, FP const fp)
Namespace & addFunction(char const *name, FP const fp)
Namespace registerArray(char const *name)
Class< std::map< K, V > > beginStdMap(char const *name)
Namespace(char const *name, Namespace const *parent)
WSPtrClass< T > deriveWSPtrClass(char const *name)
Namespace & addVariable(char const *name, T *pt, bool isWritable=true)
Class< std::bitset< T > > beginStdBitSet(char const *name)
static Namespace getGlobalNamespace(lua_State *L)
Class< std::shared_ptr< const std::vector< T > > > beginPtrConstStdVector(char const *name)
Class< std::vector< T > > beginStdVector(char const *name)
Namespace(Namespace const &other)
Namespace & operator=(Namespace const &other)
Namespace & addConst(char const *name, const U val)
Class< std::list< T > > beginStdList(char const *name)
Class< std::list< T > > beginConstStdList(char const *name)
Namespace(Namespace const *child)
Class< std::list< T * > > beginConstStdCPtrList(char const *name)
Class< std::list< T * > > beginStdCPtrList(char const *name)
Class< std::vector< T > > beginConstStdVector(char const *name)
Class< std::shared_ptr< const std::list< T > > > beginPtrConstStdList(char const *name)
GtkImageIconNameData name
int() luaL_error(lua_State *L, const char *fmt,...)
int() luaL_newmetatable(lua_State *L, const char *tname)
int() lua_getinfo(lua_State *L, const char *what, lua_Debug *ar)
#define lua_istable(L, n)
#define lua_insert(L, idx)
int() lua_rawget(lua_State *L, int idx)
#define lua_pushcfunction(L, f)
int() lua_rawgetp(lua_State *L, int idx, const void *p)
void() lua_setfield(lua_State *L, int idx, const char *k)
#define LUA_REGISTRYINDEX
int() lua_iscfunction(lua_State *L, int idx)
void() lua_pushvalue(lua_State *L, int idx)
void() lua_pushlightuserdata(lua_State *L, void *p)
int() lua_setmetatable(lua_State *L, int objindex)
const char *() lua_pushstring(lua_State *L, const char *s)
void *() lua_newuserdata(lua_State *L, size_t sz)
void() lua_rawsetp(lua_State *L, int idx, const void *p)
#define lua_isfunction(L, n)
#define lua_remove(L, idx)
#define lua_call(L, n, r)
void() lua_pushboolean(lua_State *L, int b)
int() lua_gettop(lua_State *L)
void() lua_pushnumber(lua_State *L, lua_Number n)
int() lua_isstring(lua_State *L, int idx)
void() lua_pushnil(lua_State *L)
#define lua_upvalueindex(i)
int() lua_getmetatable(lua_State *L, int objindex)
int() lua_getstack(lua_State *L, int level, lua_Debug *ar)
int() lua_isuserdata(lua_State *L, int idx)
#define lua_tostring(L, i)
int() lua_getglobal(lua_State *L, const char *name)
void() lua_pushcclosure(lua_State *L, lua_CFunction fn, int n)
void add(const Gtk::StockItem &item)
static int newindexMetaMethod(lua_State *L)
static int readOnlyError(lua_State *L)
static int indexMetaMethod(lua_State *L)
static void push(lua_State *L, T const &t)