mirror of
https://github.com/ldmud/ldmud
synced 2026-08-12 14:26:05 -04:00
Add a new type 'lpctype' to contain a type object, describing a compile-time type, together with a decltype() operator and to_lpctype() and check_type() efuns.
55 lines
2.3 KiB
Text
55 lines
2.3 KiB
Text
SYNOPSIS
|
|
#include <functionlist.h>
|
|
#include <lpctypes.h>
|
|
|
|
mixed * functionlist(object|lwobject|string ob, int flags)
|
|
|
|
DESCRIPTION
|
|
Returns an array with information about <ob>s lfunctions. For every
|
|
function, 1 to 4 values (depending on <flags>) are stored in
|
|
the result array conveying in this order:
|
|
- the name of the function
|
|
- the function flags (see below)
|
|
- the return type (listed in <lpctypes.h>)
|
|
- the number of accepted argumens
|
|
|
|
<ob> may be given as regular or lightweight object or as a filename.
|
|
In the latter case, the efun does not try to load the object before
|
|
proceeding.
|
|
|
|
<flags> determines both which information is returned for every
|
|
function, and which functions should be considered at all.
|
|
Its value is created by bin-or'ing together following flags from
|
|
<functionlist.h>:
|
|
|
|
Control of returned information:
|
|
RETURN_FUNCTION_NAME include the function name
|
|
RETURN_FUNCTION_FLAGS include the function flags
|
|
RETURN_FUNCTION_TYPE include the return type as an integer
|
|
RETURN_FUNCTION_LPCTYPE include the return type as lpctype value
|
|
RETURN_FUNCTION_NUMARG include the number of arguments.
|
|
|
|
The name RETURN_FUNCTION_ARGTYPE is defined but not implemented.
|
|
|
|
Control of listed functions:
|
|
NAME_INHERITED don't list if defined by inheritance
|
|
TYPE_MOD_STATIC don't list if static function
|
|
TYPE_MOD_PRIVATE don't list if private
|
|
TYPE_MOD_PROTECTED don't list if protected
|
|
NAME_HIDDEN don't list if not visible through inheritance
|
|
|
|
The 'flags' information consists of the bin-or of the list control
|
|
flags given above, plus the following:
|
|
|
|
TYPE_MOD_VARARGS function takes varargs
|
|
NAME_UNDEFINED function not defined yet, but referenced.
|
|
NAME_CROSS_DEFINED function is defined to be in a different program
|
|
TYPE_MOD_NO_MASK function is nomask
|
|
TYPE_MOD_PUBLIC function is public
|
|
|
|
HISTORY
|
|
LDMud 3.6.7 introduced RETURN_FUNCTION_LPCTYPE.
|
|
|
|
SEE ALSO
|
|
inherit_list(E), function_exists(E), variable_list(E),
|
|
call_resolved(E)
|