24 #ifndef _GEMALUA_OBJECT_H_ 25 #define _GEMALUA_OBJECT_H_ 30 #include <QAtomicInteger> 46 void ref() { _refCount.ref(); }
52 virtual const char* typeName()
const = 0;
60 virtual void fillMetatable(lua_State* L,
int index) = 0;
74 int gc (lua_State* L);
75 int tostring(lua_State* L);
const GmLogCategory & _logger
A logger used by the proxy when needed.
Definition: gmLuaObject.h:62
QAtomicInteger< int > _refCount
Lua objects are reference counted to enable sharing them among different states. This is needed to al...
Definition: gmLuaObject.h:69
Declaration of the function used to prepare an environment with the core Lua functions.
void ref()
Increments the object reference count. Use with care.
Definition: gmLuaObject.h:46
QVariant ptrToVariant()
Constructs a QVariant storing a POINTER to the current object.
Definition: gmLuaObject.h:43
void setValue(const T &value)
virtual void populateMetatable(lua_State *L, int index)=0
virtual QString toString() const
Default method used by the __tostring metamethod to capture the result of tostring() over an object.
Definition: gmLuaObject.h:55
A proxy class to export object methods to the Lua environment.
Definition: gmLuaObject.h:35