![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "support.h"
Include dependency graph for luascript_func.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | luascript_func_init (struct fc_lua *fcl) |
| Initialize the structures needed to save functions definitions. More... | |
| void | luascript_func_free (struct fc_lua *fcl) |
| Free the function definitions. More... | |
| bool | luascript_func_check (struct fc_lua *fcl, QVector< QString > *missing_func_required, QVector< QString > *missing_func_optional) |
| Test if all function are defines. More... | |
| void | luascript_func_add_valist (struct fc_lua *fcl, const char *func_name, bool required, int nargs, int nreturns, va_list args) |
| Add a lua function. More... | |
| void | luascript_func_add (struct fc_lua *fcl, const char *func_name, bool required, int nargs, int nreturns,...) |
| Add a lua function. More... | |
| bool | luascript_func_call_valist (struct fc_lua *fcl, const char *func_name, va_list args) |
| Call a lua function; return value is TRUE if no errors occurred, otherwise FALSE. More... | |
| bool | luascript_func_call (struct fc_lua *fcl, const char *func_name,...) |
| Call a lua function; return value is TRUE if no errors occurred, otherwise FALSE. More... | |
| bool | luascript_func_is_required (struct fc_lua *fcl, const char *func_name) |
| Return iff the function is required. More... | |
| void luascript_func_add | ( | struct fc_lua * | fcl, |
| const char * | func_name, | ||
| bool | required, | ||
| int | nargs, | ||
| int | nreturns, | ||
| ... | |||
| ) |
Add a lua function.
Definition at line 141 of file luascript_func.cpp.
Referenced by script_server_functions_define().
| void luascript_func_add_valist | ( | struct fc_lua * | fcl, |
| const char * | func_name, | ||
| bool | required, | ||
| int | nargs, | ||
| int | nreturns, | ||
| va_list | args | ||
| ) |
Add a lua function.
Definition at line 105 of file luascript_func.cpp.
Referenced by luascript_func_add().
| bool luascript_func_call | ( | struct fc_lua * | fcl, |
| const char * | func_name, | ||
| ... | |||
| ) |
Call a lua function; return value is TRUE if no errors occurred, otherwise FALSE.
Example call to the lua function 'user_load()': success = luascript_func_call(L, "user_load", pconn, &password);
Definition at line 236 of file luascript_func.cpp.
| bool luascript_func_call_valist | ( | struct fc_lua * | fcl, |
| const char * | func_name, | ||
| va_list | args | ||
| ) |
Call a lua function; return value is TRUE if no errors occurred, otherwise FALSE.
Example call to the lua function 'user_load()': success = luascript_func_call(L, "user_load", pconn, &password);
Definition at line 185 of file luascript_func.cpp.
Referenced by luascript_func_call(), and script_server_call().
| bool luascript_func_check | ( | struct fc_lua * | fcl, |
| QVector< QString > * | missing_func_required, | ||
| QVector< QString > * | missing_func_optional | ||
| ) |
Test if all function are defines.
If it fails (return value FALSE), the missing functions are listed in 'missing_func_required' and 'missing_func_optional'.
Definition at line 75 of file luascript_func.cpp.
| void luascript_func_free | ( | struct fc_lua * | fcl | ) |
Free the function definitions.
Definition at line 154 of file luascript_func.cpp.
Referenced by luascript_destroy().
| void luascript_func_init | ( | struct fc_lua * | fcl | ) |
Initialize the structures needed to save functions definitions.
Definition at line 168 of file luascript_func.cpp.
Referenced by script_server_init().
| bool luascript_func_is_required | ( | struct fc_lua * | fcl, |
| const char * | func_name | ||
| ) |
Return iff the function is required.
Definition at line 251 of file luascript_func.cpp.