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