-
Notifications
You must be signed in to change notification settings - Fork 0
Function bindable
Parses next function declaration. Example:
//@ASBindGen Function
float CalculateFarmsProductionAmount (District *district, GameConfiguration *configuration);
It reads CalculateFarmsProductionAmount
function declaration.
Functions can be parsed as free functions and as class methods. If Function
command-comment found inside class declaration, it will be parsed as class method (if function is not static
) or as free function (if function is static
).
Overrides function binding name. Example:
//@ASBindGen Function OverrideName=MySuperFunction
ReturnType MyFunction ();
Overrides argument at argIndex
type. Index -1
means return type. Example:
//@ASBindGen Function OverrideType_arg-1=NewReturnType OverrideType_arg0=NewArgType
ReturnType MyFunction (OldArgType arg);
Overrides argument at argIndex
name. Example:
//@ASBindGen Function OverrideName_arg0=newArgName
ReturnType MyFunction (ArgType oldArgName);
Replaces in argument at argIndex
type string before |
by string after '|'. Index -1
means return type. Example:
//@ASBindGen Function ReplaceInType_arg-1=String|NewString ReplaceInType_arg0=&|
StringRet MyFunction (ArgType &arg);
Replaces in argument at argIndex
name string before |
by string after '|'. Example:
//@ASBindGen Function ReplaceInType_arg0=XXX|YYY
ReturnType MyFunction (ArgType argXXX);
Pass pointer to Urho3D script context to this arg in wrapper. Example:
//@ASBindGen Function UseUrho3DScriptContext_arg0
Object *DoSomething (Urho3D::Context *context);
Note: this function will be accessable from script as DoSomething ()
, script context argument will be skipped in bindings.
Add ref to handle of argument at argIndex
after function call. Index -1
means return type. Example:
//@ASBindGen Function AddRef_arg-1
Object *DoSomething ();
Use VectorToHandleArray
converter in wrapper instead of VectorToArray
. Useful if you return an array of pointers. Example:
//@ASBindGen Function ReturnHandleArray
Vector <Object *> DoSomething ();
Only for free functions!
Adds namespace to function accessor in generated wrapper. Useful in situations like this:
namespace DistrictUtils
{
//@ASBindGen Function AddNamespaceToCallName=DistrictUtils
float CalculateFarmsProductionAmount (District *district, GameConfiguration *configuration);
...
}