209 template <
class FnPtr,
234 template <
class FnPtr>
253 template <
class FnPtr,
272 template <
class FnPtr>
298 template <
class MemFnPtr,
308 T*
const t = Userdata::get <T> (L, 1,
false);
317 template <
class MemFnPtr,
327 T const*
const t = Userdata::get <T> (L, 1,
true);
336 template <
class MemFnPtr,
class T,
345 std::shared_ptr<T>*
const t = Userdata::get <std::shared_ptr<T> > (L, 1,
false);
346 T*
const tt = t->get();
358 template <
class MemFnPtr,
class T,
367 std::shared_ptr<T const>*
const t = Userdata::get <std::shared_ptr<T const> > (L, 1,
true);
368 T*
const tt =
const_cast<T*
> (t->get());
380 template <
class T,
class R>
396 T
const*
const t0 = Userdata::get <T> (L, 1,
true);
397 T
const*
const t1 = Userdata::get <T> (L, 2,
true);
403 template <
class T,
class R>
408 T *
const t = Userdata::get <T> (L, 1,
false );
414 template <
class T,
class R>
419 T
const*
const t = Userdata::get <T> (L, 1,
true);
443 std::shared_ptr<T>
const t = tw.lock();
445 T*
const tt = t.get();
473 std::shared_ptr<T>
const t0 = tw0.lock();
474 std::shared_ptr<T>
const t1 = tw1.lock();
476 T*
const tt0 = t0.get();
477 T*
const tt1 = t1.get();
503 template <
class C,
typename T>
507 C
const*
const c = cp.get();
516 template <
class C,
typename T>
520 std::shared_ptr<C>
const cp = cw.lock();
522 return luaL_error (L,
"cannot lock weak_ptr");
524 C
const*
const c = cp.get();
533 template <
class C,
typename T>
537 C*
const c = cp.get();
546 template <
class C,
typename T>
550 std::shared_ptr<C> cp = cw.lock();
552 return luaL_error (L,
"cannot lock weak_ptr");
554 C*
const c = cp.get();
563 template <
class MemFnPtr,
class T,
572 std::weak_ptr<T>*
const tw = Userdata::get <std::weak_ptr<T> > (L, 1,
false);
573 std::shared_ptr<T>
const t = tw->lock();
575 return luaL_error (L,
"cannot lock weak_ptr");
577 T*
const tt = t.get();
592 template <
class MemFnPtr,
602 T*
const t = Userdata::get <T> (L, 1,
false);
614 template <
class MemFnPtr,
624 T const*
const t = Userdata::get <T> (L, 1,
true);
636 template <
class MemFnPtr,
class T,
645 std::shared_ptr<T>*
const t = Userdata::get <std::shared_ptr<T> > (L, 1,
false);
646 T*
const tt = t->get();
661 template <
class MemFnPtr,
class T,
670 std::shared_ptr<T const>*
const t = Userdata::get <std::shared_ptr<T const> > (L, 1,
true);
671 T*
const tt =
const_cast<T*
> (t->get());
686 template <
class MemFnPtr,
class T,
695 std::weak_ptr<T>*
const tw = Userdata::get <std::weak_ptr<T> > (L, 1,
false);
696 std::shared_ptr<T>
const t = tw->lock();
698 return luaL_error (L,
"cannot lock weak_ptr");
700 T*
const tt = t.get();
722 template <
class MemFnPtr>
731 T*
const t = Userdata::get <T> (L, 1,
false);
740 template <
class MemFnPtr>
749 T const*
const t = Userdata::get <T> (L, 1,
true);
758 template <
class MemFnPtr,
class T>
766 std::shared_ptr<T>*
const t = Userdata::get <std::shared_ptr<T> > (L, 1,
false);
767 T*
const tt = t->get();
776 template <
class MemFnPtr,
class T>
784 std::shared_ptr<T const>*
const t = Userdata::get <std::shared_ptr<T const> > (L, 1,
true);
785 T*
const tt =
const_cast<T*
> (t->get());
794 template <
class MemFnPtr,
class T>
802 std::weak_ptr<T>*
const tw = Userdata::get <std::weak_ptr<T> > (L, 1,
false);
803 std::shared_ptr<T>
const t = tw->lock();
805 return luaL_error (L,
"cannot lock weak_ptr");
807 T*
const tt = t.get();
819 template <
class MemFnPtr>
828 T*
const t = Userdata::get <T> (L, 1,
false);
840 template <
class MemFnPtr>
849 T const*
const t = Userdata::get <T> (L, 1,
true);
861 template <
class MemFnPtr,
class T>
869 std::shared_ptr<T>*
const t = Userdata::get <std::shared_ptr<T> > (L, 1,
false);
870 T*
const tt = t->get();
885 template <
class MemFnPtr,
class T>
893 std::shared_ptr<T const>*
const t = Userdata::get <std::shared_ptr<T const> > (L, 1,
true);
894 T*
const tt =
const_cast<T*
> (t->get());
909 template <
class MemFnPtr,
class T>
917 std::weak_ptr<T>*
const tw = Userdata::get <std::weak_ptr<T> > (L, 1,
false);
918 std::shared_ptr<T>
const t = tw->lock();
920 return luaL_error (L,
"cannot lock weak_ptr");
922 T*
const tt = t.get();
951 T*
const t = Userdata::get <T> (L, 1,
false);
954 return (t->*fnptr) (L);
965 T
const*
const t = Userdata::get <T> (L, 1,
true);
968 return (t->*fnptr) (L);
976 template <
class MemFnPtr,
bool isConst>
989 template <
class MemFnPtr>
1000 template <
class MemFnPtr>
1012 template <
class MemFnPtr>
1024 template <
class MemFnPtr>
1036 template <
class MemFnPtr>
1048 template <
class MemFnPtr>
1060 template <
class MemFnPtr>
1072 template <
class MemFnPtr,
bool isConst>
1085 template <
class MemFnPtr>
1103 Userdata*
const ud = Userdata::getExact <C> (L, 1);
1120 template <
class C,
typename T>
1123 C
const*
const c = Userdata::get <C> (L, 1,
true);
1134 template <
typename U>
1150 template <
class C,
typename T>
1153 C*
const c = Userdata::get <C> (L, 1,
false);
1162 template <
typename T>
1172 template <
typename T>
1178 (*parray)[index-1] = value;
1182 template <
typename T>
1193 template <
typename T>
1199 for (
int i = 0; i < cnt; ++i) {
1207 template <
typename T>
1212 for (
int i = 0; i < cnt; ++i) {
1219 template <
typename T>
1233 template <
class T,
class C>
1236 if (!t) {
return luaL_error (L,
"invalid pointer to std::list<>/std::vector"); }
1243 t->push_back (value);
1252 template <
class T,
class C>
1255 C *
const t = Userdata::get<C> (L, 1,
false);
1256 return tableToListHelper<T, C> (L, t);
1259 template <
class T,
class C>
1262 std::shared_ptr<C>
const*
const t = Userdata::get<std::shared_ptr<C> > (L, 1,
true);
1263 if (!t) {
return luaL_error (L,
"cannot derefencee shared_ptr"); }
1264 return tableToListHelper<T, C> (L, t->get());
1269 template <
class T,
class C>
1272 C *
const t = Userdata::get<C> (L, 1,
false);
1279 template <
class T,
class C>
1281 typedef typename C::const_iterator IterType;
1286 if ((*iter) == (*end)) {
1295 template <
class T,
class C>
1298 if (!t) {
return luaL_error (L,
"invalid pointer to std::list<>/std::vector"); }
1299 typedef typename C::const_iterator IterType;
1306 template <
class T,
class C>
1309 C
const *
const t = Userdata::get <C> (L, 1,
true);
1310 return listIterHelper<T, C> (L, t);
1313 template <
class T,
class C>
1316 std::shared_ptr<C>
const*
const t = Userdata::get <std::shared_ptr<C> >(L, 1,
true);
1317 if (!t) {
return luaL_error (L,
"cannot derefencee shared_ptr"); }
1318 return listIterHelper<T, C> (L, t->get());
1323 template <
class T,
class C>
1326 if (!t) {
return luaL_error (L,
"invalid pointer to std::list<>/std::vector"); }
1331 for (
typename C::const_iterator iter = t->begin(); iter != t->end(); ++iter, ++index) {
1339 for (
typename C::const_iterator iter = t->begin(); iter != t->end(); ++iter, ++index) {
1347 template <
class T,
class C>
1350 C
const*
const t = Userdata::get <C> (L, 1,
true);
1351 return listToTableHelper<T, C> (L, t);
1354 template <
class T,
class C>
1357 std::shared_ptr<C>
const*
const t = Userdata::get <std::shared_ptr<C> > (L, 1,
true);
1358 if (!t) {
return luaL_error (L,
"cannot derefencee shared_ptr"); }
1359 return listToTableHelper<T, C> (L, t->get());
1365 template <
class T,
class C>
1368 C *
const c = Userdata::get <C> (L, 1,
false);
1369 if (!c) {
return luaL_error (L,
"invalid pointer to std::list<>"); }
1370 T *
const v = Userdata::get <T> (L, 2,
true);
1371 if (!v) {
return luaL_error (L,
"invalid pointer to std::list<>::value_type"); }
1379 template <
class K,
class V>
1382 typedef std::map<K, V> C;
1383 C *
const t = Userdata::get <C> (L, 1,
true);
1384 if (!t) {
return luaL_error (L,
"invalid pointer to std::map"); }
1393 t->insert (std::pair<K,V> (key, value));
1404 template <
class K,
class V>
1407 typedef std::map<K, V> C;
1408 typedef typename C::const_iterator IterType;
1413 if ((*iter) == (*end)) {
1423 template <
class K,
class V>
1426 typedef std::map<K, V> C;
1427 C
const *
const t = Userdata::get <C> (L, 1,
true);
1428 if (!t) {
return luaL_error (L,
"invalid pointer to std::map"); }
1429 typedef typename C::const_iterator IterType;
1437 template <
class K,
class V>
1440 typedef std::map<K, V> C;
1441 C
const*
const t = Userdata::get <C> (L, 1,
true);
1442 if (!t) {
return luaL_error (L,
"invalid pointer to std::map"); }
1446 for (
typename C::const_iterator iter = t->begin(); iter != t->end(); ++iter) {
1447 v[(*iter).first] = (*iter).second;
1454 template <
class K,
class V>
1457 typedef std::map<K, V> C;
1458 C
const*
const t = Userdata::get <C> (L, 1,
true);
1459 if (!t) {
return luaL_error (L,
"invalid pointer to std::map"); }
1461 typename C::const_iterator iter = t->find(key);
1462 if (iter == t->end()) {
1474 template <
class T,
class C>
1477 C *
const t = Userdata::get <C> (L, 1,
true);
1478 if (!t) {
return luaL_error (L,
"invalid pointer to std::set"); }
1500 template <
class T,
class C>
1503 typedef typename C::const_iterator IterType;
1508 if ((*iter) == (*end)) {
1517 template <
class T,
class C>
1520 C*
const t = Userdata::get <C> (L, 1,
false);
1521 T
const *
const v = Userdata::get <T> (L, 2,
true);
1522 auto rv = t->insert (*v);
1528 template <
class T,
class C>
1531 C
const *
const t = Userdata::get <C> (L, 1,
true);
1532 if (!t) {
return luaL_error (L,
"invalid pointer to std::set"); }
1533 typedef typename C::const_iterator IterType;
1541 template <
class T,
class C>
1544 C
const*
const t = Userdata::get <C> (L, 1,
true);
1545 if (!t) {
return luaL_error (L,
"invalid pointer to std::set"); }
1549 for (
typename C::const_iterator iter = t->begin(); iter != t->end(); ++iter) {
1559 template <
unsigned int T>
1562 typedef std::bitset<T> C;
1563 C *
const t = Userdata::get <C> (L, 1,
true);
1564 if (!t) {
return luaL_error (L,
"invalid pointer to std::bitset"); }
1573 if (member < T && v) {
1585 template <
unsigned int T>
1588 typedef std::bitset<T> C;
1589 C
const*
const t = Userdata::get <C> (L, 1,
true);
1590 if (!t) {
return luaL_error (L,
"invalid pointer to std::bitset"); }
1594 for (
unsigned int i = 0; i < T; ++i) {
bool isfulluserdata(lua_State *L, int index)
void rawsetfield(lua_State *L, int index, char const *key)
void rawgetfield(lua_State *L, int index, char const *key)
LuaRef newTable(lua_State *L)
static LuaRef fromStack(lua_State *L, int index)
void push(lua_State *L) const
GtkImageIconNameData name
int() luaL_error(lua_State *L, const char *fmt,...)
#define luaL_getmetatable(L, n)
void *() luaL_checkudata(lua_State *L, int ud, const char *tname)
#define lua_istable(L, n)
int() lua_rawget(lua_State *L, int idx)
int() lua_iscfunction(lua_State *L, int idx)
void() lua_createtable(lua_State *L, int narr, int nrec)
void() lua_pushvalue(lua_State *L, int idx)
#define lua_islightuserdata(L, n)
int() lua_setmetatable(lua_State *L, int objindex)
int() lua_next(lua_State *L, int idx)
void *() lua_newuserdata(lua_State *L, size_t sz)
void() lua_rawseti(lua_State *L, int idx, lua_Integer n)
#define lua_remove(L, idx)
void *() lua_touserdata(lua_State *L, int idx)
#define lua_call(L, n, r)
int() lua_gettop(lua_State *L)
void() lua_pushnil(lua_State *L)
#define lua_upvalueindex(i)
int() lua_getmetatable(lua_State *L, int objindex)
#define lua_tostring(L, i)
void() lua_pushcclosure(lua_State *L, lua_CFunction fn, int n)
void push(lua_State *L, T t)
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
FuncTraits< MemFnPtr >::ClassType T
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
FuncTraits< MemFnPtr >::ClassType T
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
static void add(lua_State *L, char const *name, MemFnPtr mf)
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
static void add(lua_State *L, char const *name, MemFnPtr mf)
static void add(lua_State *L, char const *name, MemFnPtr mf)
FuncTraits< MemFnPtr >::ClassType T
static void add(lua_State *L, char const *name, MemFnPtr mf)
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
static void add(lua_State *L, char const *name, MemFnPtr mf)
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
static void add(lua_State *L, char const *name, MemFnPtr mf)
static void add(lua_State *L, char const *name, MemFnPtr mf)
static void add(lua_State *L, char const *name, MemFnPtr mf)
FuncTraits< MemFnPtr >::ClassType T
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
static void add(lua_State *L, char const *name, MemFnPtr mf)
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
FuncTraits< MemFnPtr >::Params Params
FuncTraits< MemFnPtr >::Params Params
FuncTraits< MemFnPtr >::ClassType T
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
static void add(lua_State *L, char const *name, MemFnPtr mf)
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
static int f(lua_State *L)
FuncTraits< MemFnPtr >::Params Params
FuncTraits< MemFnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< MemFnPtr >::ClassType T
static int f(lua_State *L)
FuncTraits< FnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< FnPtr >::Params Params
FuncTraits< FnPtr >::Params Params
static int f(lua_State *L)
FuncTraits< FnPtr >::Params Params
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int f(lua_State *L)
static int mapIter(lua_State *L)
static int newindexMetaMethod(lua_State *L)
static int offsetArray(lua_State *L)
static int readOnlyError(lua_State *L)
static int setTable(lua_State *L)
static int listIterIter(lua_State *L)
static int setInsert(lua_State *L)
static int tableToSet(lua_State *L)
static int getVariable(lua_State *L)
static int setVariable(lua_State *L)
static int listToTableHelper(lua_State *L, C const *const t)
static int tableToList(lua_State *L)
static int getWPtrProperty(lua_State *L)
static int setToTable(lua_State *L)
static int listIter(lua_State *L)
static int indexMetaMethod(lua_State *L)
static int tableToMap(lua_State *L)
static int getProperty(lua_State *L)
static int getArray(lua_State *L)
static int array_index(lua_State *L)
static int mapIterIter(lua_State *L)
static int getPtrProperty(lua_State *L)
static int setPtrProperty(lua_State *L)
static int setIter(lua_State *L)
static int listToTable(lua_State *L)
static int ptrListToTable(lua_State *L)
static int ptrTableToList(lua_State *L)
static int bitSetToTable(lua_State *L)
static int gcMetaMethod(lua_State *L)
static int tableToBitSet(lua_State *L)
static int mapToTable(lua_State *L)
static int getConst(lua_State *L)
static int vectorToArray(lua_State *L)
static int getTable(lua_State *L)
static int tableToListHelper(lua_State *L, C *const t)
static int setIterIter(lua_State *L)
static int pushbackptr(lua_State *L)
static int setProperty(lua_State *L)
static int ptrListIter(lua_State *L)
static int gcNOOPMethod(lua_State *L)
static int array_newindex(lua_State *L)
static int setWPtrProperty(lua_State *L)
static int listIterHelper(lua_State *L, C const *const t)
static int mapAt(lua_State *L)
static std::conditional_t< passByValueNotEnum, T const &, T > get(lua_State *L, int index)
static void push(lua_State *L, T const &t)