| SYNOPSIS |
| #include <struct_info.h> |
| #include <lpctypes.h> |
| |
| mixed * struct_info (struct st, int what) |
| |
| DESCRIPTION |
| Return information about the structure of struct <st> in an array. |
| If <st> has a base struct, <what> determines how the information |
| is returned: |
| |
| <what> == SINFO_FLAT: |
| All members of <st>, including those inherited from the base |
| struct, are returned on the top level of the result. |
| The base struct is signified by just its name. |
| |
| <what> == SINFO_NESTED: |
| Only the members defined in <st> itself are returned on |
| the top level of the result. The information for the base |
| struct is a array by itself, as it would be returned |
| by a call to struct_info() for a base struct instance. |
| |
| The elements in the resulting array are: |
| |
| string [SI_NAME]: the name of the struct |
| string [SI_PROG_NAME]: the name of program defining the struct |
| string [SI_PROG_ID]: the id of the program defining the struct |
| mixed [SI_BASE]: 0, or the base struct information |
| mixed* [SI_MEMBER+0]: the first member information |
| mixed* [SI_MEMBER+n]: the last member information |
| |
| The member information entries are arrays themselves with |
| these elements: |
| |
| string [SIM_NAME]: name of the member |
| int [SIM_TYPE]: the type of the member (compile-time value) |
| string [SIM_EXTRA]: 0, or if the member is a struct, the |
| struct name |
| |
| HISTORY |
| Introduced in LDMud 3.3.344. |
| LDMud 3.3.417 introduced SI_PROG_NAME and SI_PROG_ID in exchange |
| for SI_UNIQUE_NAME. |
| |
| SEE ALSO |
| structs(LPC) |