|
QLua
Lua-Qt bindings
|
Abstract base class for return constructors which create Lua values from C++ values. More...
#include <LuaArguments.h>

Public Member Functions | |
| virtual void | Push (lua_State *) const =0 |
| Push value on Lua stack, invoked when a value must be returned from a method invoked from Lua. | |
| virtual void | Push (lua_State *, void *) const =0 |
| Push value read from a specific memory location on Lua stack, invoked when calling a method as result of signal emission. | |
| virtual | ~LArgConstructor () |
| Virtual destructor. | |
| virtual LArgConstructor * | Clone () const =0 |
| Return copy of object. | |
| virtual QMetaType::Type | Type () const =0 |
| Return type of constructed data. | |
| QGenericReturnArgument | Argument () const |
| Return QGenericReturnArguments holding a reference to the memory location where the returned value is stored. | |
| virtual bool | IsQObjectPtr () const |
Return true if type is a pointer to a QObject-derived object. | |
Protected Member Functions | |
| template<typename T > | |
| void | SetArg (T &arg) |
| Creates return argument of the proper type. | |
Protected Attributes | |
| QGenericReturnArgument | ga_ |
| Placeholder for returned data. | |
Abstract base class for return constructors which create Lua values from C++ values.
| virtual bool qlua::LArgConstructor::IsQObjectPtr | ( | ) | const [inline, virtual] |
Return true if type is a pointer to a QObject-derived object.
This is required to have the QLua run-time add the passed QObject into the Lua context. The other option is to have LArgConstructors::Push receive a reference to a LuaContext which introduces a two-way dependency between LArgConstructor and LuaContext.
Reimplemented in qlua::ObjectStarLArgConstructor, and qlua::WidgetStarLArgConstructor.
1.7.4