.. efun:: mixed * object_info(object ob, int what) mixed * object_info(object ob, int what, int index) :include: Returns some internal information about object :arg:`ob`, collected in an array. Argument :arg:`what` determines which information is returned. The result is usually an array. However, if :arg:`index` is specified, the result is the value from position :arg:`index` of the array which would have been returned normally. .. caution:: The possible values of :arg:`what`, and the indices of the returned arrays are defined in the include file , and may change in future versions of the driver! .. todo:: should there be a role for referencing includes? :arg:`what` == :macro:`OINFO_BASIC`: This call returns basic information about :arg:`ob`: int [:macro:`OIB_HEART_BEAT`]: 1 if :arg:`ob` has a heart_beat, 0 else. int [:macro:`OIB_IS_WIZARD`]: 1 if :arg:`ob` has the wizard flag set, 0 else. This entry is always 0 when :efun:`set_is_wizard` is not available. int [:macro:`OIB_ENABLE_COMMANDS`]: 1 if :arg:`ob` can give commands, 0 else. int [:macro:`OIB_CLONE`]: 1 if :arg:`ob` is a clone, 0 else. int [:macro:`OIB_DESTRUCTED`]: 1 if :arg:`ob` is destructed, 0 else. int [:macro:`OIB_SWAPPED`]: 1 if :arg:`ob` is swapped, 0 else. int [:macro:`OIB_ONCE_INTERACTIVE`]: 1 if :arg:`ob` was once interactive, 0 else. int [:macro:`OIB_RESET_STATE`]: 1 if :arg:`ob` is (still) reset, 0 else. int [:macro:`OIB_WILL_CLEAN_UP`]: 1 if :arg:`ob` will call :applied:`clean_up`, 0 else. int [:macro:`OIB_LAMBDA_REFERENCED`]: 1 if :arg:`ob` has lambdas, 0 else. int [:macro:`OIB_SHADOW`]: 1 if :arg:`ob` has a shadow structure tied to it, 0 if not. int [:macro:`OIB_REPLACED`]: 1 if the program for :arg:`ob` was replaced, 0 else. int [:macro:`OIB_NEXT_RESET`]: time of the next reset int [:macro:`OIB_TIME_OF_REF`]: time of the last call to :arg:`ob` int [:macro:`OIB_NEXT_CLEANUP`]: time of the next data cleanup int [:macro:`OIB_REF`]: number of references to :arg:`ob` int [:macro:`OIB_GIGATICKS`] and [:macro:`OIB_TICKS`]: together, these numbers give the accumulated evaluation cost spend in :arg:`ob` int [:macro:`OIB_SWAP_NUM`]: the swap number for :arg:`ob's ` program, or -1 if not swapped. int [:macro:`OIB_PROG_SWAPPED`]: 1 if :arg:`ob`'s program is swapped, 0 else. int [:macro:`OIB_VAR_SWAPPED`]: 1 if :arg:`ob`'s variables are swapped, 0 else. int [:macro:`OIB_NAME`]: :arg:`ob`'s object name. int [:macro:`OIB_LOAD_NAME`]: :arg:`ob`'s load name. object [:macro:`OIB_NEXT_ALL`]: next object in the object list. object [:macro:`OIB_PREV_ALL`]: previous object in the object list. :arg:`what` == :macro:`OINFO_POSITION`: This call returns information about :arg:`ob`'s position in the global list of objects: object [:macro:`OIP_NEXT`]: next object in the object list. object [:macro:`OIP_PREV`]: previous object in the object list. int [:macro:`OIP_POS`]: position of :arg:`ob` in list, counting from 0 up. This call can be expensive in computing time. :arg:`what` == :macro:`OINFO_MEMORY`: This call returns information about the program :arg:`ob` uses: .. todo:: reformat below int [:macro:`OIM_REF`]: number of references to the program. string [:macro:`OIM_NAME`]: name of program. int [:macro:`OIM_PROG_SIZE`]: size of the program. int [:macro:`OIM_NUM_FUNCTIONS`]: number of functions in the program. int [:macro:`OIM_SIZE_FUNCTIONS`]: size needed for the function structs. int [:macro:`OIM_NUM_VARIABLES`]: number of variables in the program. int [:macro:`OIM_SIZE_VARIABLES`]: size needed for the variable structs. int [:macro:`OIM_NUM_STRINGS`]: number of strings in the program. int [:macro:`OIM_SIZE_STRINGS`]: size needed for the string pointers. int [:macro:`OIM_SIZE_STRINGS_DATA`]: size needed for the string data, scaled down according to the extend of data sharing. int [:macro:`OIM_SIZE_STRINGS_TOTAL`]: unmodified size needed for the string data. int [:macro:`OIM_NUM_INCLUDES`]: number of included files in the program. int [:macro:`OIM_NUM_INHERITED`]: number of inherited programs. int [:macro:`OIM_SIZE_INHERITED`]: size needed for the inherit structs. int [:macro:`OIM_TOTAL_SIZE`]: total size of the program. int [:macro:`OIM_DATA_SIZE`]: total size of the values held in the object's variables, scaled down according to the extend of data sharing. int [:macro:`OIM_DATA_SIZE_TOTAL`]: unmodified total size of the values held in the object's variables int [:macro:`OIM_NO_INHERIT`]: 1 if the program can't be inherited. int [:macro:`OIM_NO_CLONE`]: 1 if the program/blueprint can't be cloned. int [:macro:`OIM_NO_SHADOW`]: 1 if the program's functions can't be shadowed. int [:macro:`OIM_SHARE_VARIABLES`]: 1 if clones of this program share their initial variable values with the blueprint. This call swaps in the program if necessary. .. note:: The :macro:`OIM_SIZE_xxx` entries only give the size spent on the structures and pointers, not the size of the variable data, function code, and strings themselves. :history 3.2.6 introduced: :history 3.2.7 changed: - new basic result :macro:`OIB_REPLACED`. - basic result :macro:`OIB_IS_WIZARD` is always 0 if :efun:`set_is_wizard` is not available. - basic result :macro:`OIB_APPROVED` is gone. :history 3.2.8 changed: added :macro:`OIM_DATA_SIZE` to the result of :macro:`OINFO_MEMORY`. :history 3.2.9 changed: added the index mechanism, :macro:`OIM_NUM_INCLUDES`, :macro:`OIM_NO_INHERIT`, :macro:`OIM_NO_SHADOW`, :macro:`OIM_NO_CLONE`, :macro:`OIM_SIZE_STRINGS_DATA`, :macro:`OIM_SIZE_STRINGS_TOTAL`, and :macro:`OIM_DATA_SIZE_TOTAL` to the result of :macro:`OINFO_MEMORY`. :history 3.3.378 changed: added the :macro:`OIM_SHARE_VARIABLES` to the result of :macro:`OINFO_MEMORY`. :history 3.3.654 changed: added the :macro:`OIB_NEXT_CLEANUP` to the result of :macro:`OINFO_BASIC`. .. seealso:: :efun:`debug_info`