blob: 394565114610675a73ad1a960aba64a175e0105b [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001DEPRECATED
2SYNOPSIS
3 #include <objectinfo.h>
4
5 mixed * object_info(object ob, int what)
6 mixed * object_info(object ob, int what, int index)
7
8DESCRIPTION
9 Returns some internal information about object <ob>, collected
10 in an array. Argument <what> determines which information is
11 returned.
12
13 The result is usually an array. However, if <index> is specified,
14 the result is the value from position <index> of the array which
15 would have been returned normally.
16
17 The possible values of <what>, and the indices of the returned
18 arrays are defined in the include file <objectinfo.h>, and may
19 change in future versions of the driver!
20
21
22 <what> == OINFO_BASIC:
23
24 This call returns basic information about <ob>:
25
26 int [OIB_HEART_BEAT]: 1 if <ob> has a heart_beat, 0 else.
27 int [OIB_IS_WIZARD]: 1 if <ob> has the wizard flag set,
28 0 else.
29 This entry is always 0 when set_is_wizard() is not available.
30 int [OIB_ENABLE_COMMANDS]: 1 if <ob> can give commands, 0 else.
31 int [OIB_CLONE]: 1 if <ob> is a clone, 0 else.
32 int [OIB_DESTRUCTED]: 1 if <ob> is destructed, 0 else.
33 int [OIB_SWAPPED]: 1 if <ob> is swapped, 0 else.
34 int [OIB_ONCE_INTERACTIVE]: 1 if <ob> was once interactive, 0 else.
35 int [OIB_RESET_STATE]: 1 if <ob> is (still) reset, 0 else.
36 int [OIB_WILL_CLEAN_UP]: 1 if <ob> will call clean_up(), 0 else.
37 int [OIB_LAMBDA_REFERENCED]: 1 if <ob> has lambdas, 0 else.
38 int [OIB_SHADOW]: 1 if <ob> has a shadow structure tied
39 to it, 0 if not.
40 int [OIB_REPLACED]: 1 if the program for <ob> was replaced,
41 0 else.
42 int [OIB_NEXT_RESET]: time of the next reset
43 int [OIB_TIME_OF_REF]: time of the last call to <ob>
44 int [OIB_NEXT_CLEANUP]: time of the next data cleanup
45 int [OIB_REF]: number of references to <ob>
46 int [OIB_GIGATICKS] and [OIB_TICKS]: together, these numbers
47 give the accumulated evaluation cost spend in <ob>
48 int [OIB_SWAP_NUM]: the swap number for <ob>s program,
49 or -1 if not swapped.
50 int [OIB_PROG_SWAPPED]: 1 if <ob>'s program is swapped, 0 else.
51 int [OIB_VAR_SWAPPED]: 1 if <ob>'s variables are swapped, 0 else.
52 int [OIB_NAME]: <ob>'s object name.
53 int [OIB_LOAD_NAME]: <ob>'s load name.
54 object [OIB_NEXT_ALL]: next object in the object list.
55 object [OIB_PREV_ALL]: previous object in the object list.
56
57
58 <what> == OINFO_POSITION:
59
60 This call returns information about <ob>'s position in the
61 global list of objects:
62
63 object [OIP_NEXT]: next object in the object list.
64 object [OIP_PREV]: previous object in the object list.
65 int [OIP_POS]: position of <ob> in list, counting from 0 up.
66
67 This call can be expensive in computing time.
68
69
70 <what> == OINFO_MEMORY:
71
72 This call returns information about the program <ob> uses:
73
74 int [OIM_REF]: number of references to the program.
75 string [OIM_NAME]: name of program.
76 int [OIM_PROG_SIZE]: size of the program.
77 int [OIM_NUM_FUNCTIONS]: number of functions in the program.
78 int [OIM_SIZE_FUNCTIONS]: size needed for the function structs.
79 int [OIM_NUM_VARIABLES]: number of variables in the program.
80 int [OIM_SIZE_VARIABLES]: size needed for the variable structs.
81 int [OIM_NUM_STRINGS]: number of strings in the program.
82 int [OIM_SIZE_STRINGS]: size needed for the string pointers.
83 int [OIM_SIZE_STRINGS_DATA]: size needed for the string data,
84 scaled down according to the extend of
85 data sharing.
86 int [OIM_SIZE_STRINGS_TOTAL]: unmodified size needed for the
87 string data.
88 int [OIM_NUM_INCLUDES]: number of included files in the program.
89 int [OIM_NUM_INHERITED]: number of inherited programs.
90 int [OIM_SIZE_INHERITED]: size needed for the inherit structs.
91 int [OIM_TOTAL_SIZE]: total size of the program.
92 int [OIM_DATA_SIZE]: total size of the values held in the
93 object's variables, scaled down
94 according to the extend of data
95 sharing.
96 int [OIM_DATA_SIZE_TOTAL]: unmodified total size of the values
97 held in the object's variables
98 int [OIM_NO_INHERIT]: 1 if the program can't be inherited.
99 int [OIM_NO_CLONE]: 1 if the program/blueprint can't be
100 cloned.
101 int [OIM_NO_SHADOW]: 1 if the program's functions can't be
102 shadowed.
103 int [OIM_SHARE_VARIABLES]: 1 if clones of this program share
104 their initial variable values with
105 the blueprint.
106
107 This call swaps in the program if necessary.
108 Note that the OIM_SIZE_xxx entries only give the size spent on
109 the structures and pointers, not the size of the variable data,
110 function code, and strings themselves.
111
112HISTORY
113 Introduced in LDMud 3.2.6.
114 Changes in LDMud 3.2.7:
115 - new basic result OIB_REPLACED.
116 - basic result OIB_IS_WIZARD is always 0 if set_is_wizard()
117 is not available.
118 - basic result OIB_APPROVED is gone.
119 LDMud 3.2.8 added OIM_DATA_SIZE to the result of OINFO_MEMORY.
120 LDMud 3.2.9 added the index mechanism, OIM_NUM_INCLUDES,
121 OIM_NO_INHERIT, OIM_NO_SHADOW, OIM_NO_CLONE, OIM_SIZE_STRINGS_DATA,
122 OIM_SIZE_STRINGS_TOTAL, and OIM_DATA_SIZE_TOTAL to the result
123 of OINFO_MEMORY.
124 LDMud 3.3.378 added the OIM_SHARE_VARIABLES to the result
125 of OINFO_MEMORY.
126 LDMud 3.3.654 added the OIB_NEXT_CLEANUP to the result of OINFO_BASIC.
127
128SEE ALSO
129 debug_info(E)