Go to the documentation of this file.
45 if(m_fieldsTableRef != -1) {
56 if(m_fieldsTableRef != -1) {
58 m_fieldsTableRef = -1;
65 if(m_fieldsTableRef == -1) {
78 if(m_fieldsTableRef != -1) {
89 static std::unordered_map<const std::type_info*, int> metatableMap;
90 const std::type_info& tinfo =
typeid(*this);
91 auto it = metatableMap.find(&tinfo);
94 if(it == metatableMap.end()) {
97 metatableMap[&tinfo] = metatableRef;
99 metatableRef = it->second;
106 if(m_fieldsTableRef != -1)
void luaGetMetatable()
Get object's metatable.
void luaGetFieldsTable()
Gets the table containing all stored fields of this lua object, the result is pushed onto the stack.
void getGlobal(const std::string &key)
std::string getClassName()
Returns the derived class name, its the same name used in Lua.
void getField(const char *key, int index=-1)
const char * demangle_name(const char *name)
Demangle names for GNU g++ compiler.
void releaseLuaFieldsTable()
Release fields table reference.
void luaSetField(const std::string &key)
Sets a field from this lua object, the value must be on the stack.
void luaGetField(const std::string &key)
Gets a field from this lua object, the result is pushed onto the stack.
void setField(const char *key, int index=-2)
bool hasLuaField(const std::string &field)
Returns true if the lua field exists.