|
QLua
Lua-Qt bindings
|
Wrapper for parameters in a QObject method invocation. More...
#include <LuaArguments.h>

Public Member Functions | |
| QArgWrapper () | |
| Default constructor. | |
| QArgWrapper (const QArgWrapper &other) | |
| Copy constructor: Clone QArgConstructor instance. | |
| QArgWrapper (const QString &type) | |
| Construct instance from type name. Creates proper instance of inner QArgConstructor from type info. | |
| QGenericArgument | Arg (lua_State *L, int idx) const |
| Return QGenericArgument instance created from values on the Lua stack. | |
| ~QArgWrapper () | |
| Destructor; delete QArgConstructor instance. | |
Wrapper for parameters in a QObject method invocation.
Whenever a new QObject is added to the Lua context, the signature of each method is translated to an index and a list of QArgWrapper objects stored inside a LuaContext instance. At invocation time the proper method is invoked through a call to QMetaMethod::invoke passing the arguments returned by the QArgWrapper::Arg method invoked on each parameter in the argument list. QArgWrapper stores an instance of QArgConstructor used to create a QGenericArgument from values on the Lua stack.
| QGenericArgument qlua::QArgWrapper::Arg | ( | lua_State * | L, |
| int | idx | ||
| ) | const [inline] |
Return QGenericArgument instance created from values on the Lua stack.
Internally it calls QArgConstructor::Create to generate QGenericArguments from Lua values.
1.7.4