QLua
Lua-Qt bindings
Public Member Functions
qlua::QArgWrapper Class Reference

Wrapper for parameters in a QObject method invocation. More...

#include <LuaArguments.h>

Collaboration diagram for qlua::QArgWrapper:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

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.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator