Paula Script
Public Member Functions | Friends | List of all members
paula::Args Class Reference

Access callback arguments (e.g. value of "a" in "f(a)"). Set return value of the callback function, called from a script. More...

#include <args.h>

Public Member Functions

INT count ()
 Get number of arguments, eg. 3 for "f(a, b, c)". More...
 
void returnInt (INT value)
 Set return value, returned by a callback. More...
 
void returnBool (bool value)
 Set return value, returned by a callback. More...
 
bool hasReturnValue ()
 Check if a return value is set. More...
 
Var get (INT dataIndex)
 Get argument value, eg. get(2) to value of c if the call is "f(a, b, c)". More...
 

Friends

class Engine
 
class Var
 
class core::Engine
 

Detailed Description

Access callback arguments (e.g. value of "a" in "f(a)"). Set return value of the callback function, called from a script.

Member Function Documentation

◆ count()

INT paula::Args::count ( )

Get number of arguments, eg. 3 for "f(a, b, c)".

Returns
Argument count.

◆ get()

Var paula::Args::get ( INT  dataIndex)

Get argument value, eg. get(2) to value of c if the call is "f(a, b, c)".

Parameters
dataIndexArgument index, starting from 0. 0 <= dataIndex < count().
Returns
Argument value, or void (NODE_VOID) value doesn't exist. See class Var.

◆ hasReturnValue()

bool paula::Args::hasReturnValue ( )

Check if a return value is set.

Returns
True if a return value is set.

◆ returnBool()

void paula::Args::returnBool ( bool  value)

Set return value, returned by a callback.

Parameters
valueBoolean value.

◆ returnInt()

void paula::Args::returnInt ( INT  value)

Set return value, returned by a callback.

Parameters
valueInteger value.

Friends And Related Function Documentation

◆ core::Engine

friend class core::Engine
friend

◆ Engine

friend class Engine
friend

◆ Var

friend class Var
friend

The documentation for this class was generated from the following file: