OOLua  2.0.1
C++ and Lua binding
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Expressive

Generates a proxy function where a user has expressed all the details. More...

Macros

#define OOLUA_MEM_FUNC(...)
 Generates a member function proxy which will also be the named FunctionName. More...
 
#define OOLUA_MEM_FUNC_RENAME(...)
 Generates a member function proxy which will be the named ProxyFunctionName. More...
 
#define OOLUA_MEM_FUNC_CONST(...)
 Generates a constant member function proxy which will also be the named FunctionName. More...
 
#define OOLUA_MEM_FUNC_CONST_RENAME(...)
 Generates a constant member function which will be named ProxyFunctionName. More...
 
#define OOLUA_C_FUNCTION(...)
 Generates a block which will call the C function FunctionName. More...
 

Detailed Description

Generates a proxy function where a user has expressed all the details.

Generates a function for which the user has expressed all the parameters and the return type for a function. These types may also have Traits applied to them which the Minimalist section of the DSL does not allow.

Macro Definition Documentation

#define OOLUA_C_FUNCTION (   ...)

Generates a block which will call the C function FunctionName.

OOLUA_C_FUNCTION(FunctionReturnType,FunctionName, Optional)

Parameters
FunctionReturnType
FunctionName
OptionalComma separated list of function parameter types
See Also
cpp_params
Precondition
The function in which this macro is contained must declare a lua_State pointer which can be identified by the name "vm"
extern void foo(int);
int l_foo(lua_State* vm)
{
OOLUA_C_FUNCTION(void,foo,int)
}
Note
This macro should ideally be used as the last operation of a function body as control will return to the caller. Notice there is no return statement in l_foo
#define OOLUA_MEM_FUNC (   ...)

Generates a member function proxy which will also be the named FunctionName.

OOLUA_MEM_FUNC( FunctionReturnType, FunctionName, Optional)

Parameters
FunctionReturnType
FunctionName
Optional: Comma separated list of function parameter types
See Also
cpp_params
#define OOLUA_MEM_FUNC_CONST (   ...)

Generates a constant member function proxy which will also be the named FunctionName.

OOLUA_MEM_FUNC_CONST( FunctionReturnType,FunctionName,Optional)

Parameters
FunctionReturnType
FunctionName
OptionalComma separated list of function parameter types
See Also
cpp_params
#define OOLUA_MEM_FUNC_CONST_RENAME (   ...)

Generates a constant member function which will be named ProxyFunctionName.

OOLUA_MEM_FUNC_CONST_RENAME( ProxyFunctionName, FunctionReturnType, FunctionName,Optional)

Parameters
ProxyFunctionName
FunctionReturnType
FunctionName
OptionalComma separated list of function parameter types
See Also
cpp_params
#define OOLUA_MEM_FUNC_RENAME (   ...)

Generates a member function proxy which will be the named ProxyFunctionName.

OOLUA_MEM_FUNC_RENAME( ProxyFunctionName, FunctionReturnType,FunctionName, Optional)

Parameters
ProxyFunctionName
FunctionReturnType
FunctionName
Optional: Comma separated list of function parameter types
See Also
cpp_params