MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 2 | #include <functionlist.h> |
| 3 | #include <lpctypes.h> |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 4 | |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 5 | mixed * functionlist(object|lwobject|string ob, int flags) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 6 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 7 | DESCRIPTION |
| 8 | Returns an array with information about <ob>s lfunctions. For every |
| 9 | function, 1 to 4 values (depending on <flags>) are stored in |
| 10 | the result array conveying in this order: |
| 11 | - the name of the function |
| 12 | - the function flags (see below) |
| 13 | - the return type (listed in <lpctypes.h>) |
| 14 | - the number of accepted argumens |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 15 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 16 | <ob> may be given as regular or lightweight object or as a filename. |
| 17 | In the latter case, the efun does not try to load the object before |
| 18 | proceeding. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 19 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 20 | <flags> determines both which information is returned for every |
| 21 | function, and which functions should be considered at all. |
| 22 | Its value is created by bin-or'ing together following flags from |
| 23 | <functionlist.h>: |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 24 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 25 | Control of returned information: |
| 26 | RETURN_FUNCTION_NAME include the function name |
| 27 | RETURN_FUNCTION_FLAGS include the function flags |
| 28 | RETURN_FUNCTION_TYPE include the return type as an integer |
| 29 | RETURN_FUNCTION_LPCTYPE include the return type as lpctype value |
| 30 | RETURN_FUNCTION_NUMARG include the number of arguments. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 31 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 32 | The name RETURN_FUNCTION_ARGTYPE is defined but not implemented. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 33 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 34 | Control of listed functions: |
| 35 | NAME_INHERITED don't list if defined by inheritance |
| 36 | TYPE_MOD_STATIC don't list if static function |
| 37 | TYPE_MOD_PRIVATE don't list if private |
| 38 | TYPE_MOD_PROTECTED don't list if protected |
| 39 | NAME_HIDDEN don't list if not visible through inheritance |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 40 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 41 | The 'flags' information consists of the bin-or of the list control |
| 42 | flags given above, plus the following: |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 43 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 44 | TYPE_MOD_VARARGS function takes varargs |
| 45 | NAME_UNDEFINED function not defined yet, but referenced. |
| 46 | NAME_CROSS_DEFINED function is defined to be in a different program |
| 47 | TYPE_MOD_NO_MASK function is nomask |
| 48 | TYPE_MOD_PUBLIC function is public |
| 49 | |
| 50 | HISTORY |
| 51 | LDMud 3.6.7 introduced RETURN_FUNCTION_LPCTYPE. |
| 52 | |
| 53 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 54 | inherit_list(E), function_exists(E), variable_list(E), |
| 55 | call_resolved(E) |