SYNOPSIS¶
mixed * |
object_info | ( | object ob, | int what | ) | ¶||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mixed * |
object_info | ( | object ob, | int what, | int index | ) |
DESCRIPTION¶
Returns some internal information about object ob
, collected in an array. Argument what
determines which information is returned.
The result is usually an array. However, if index
is specified, the result is the value from position index
of the array which would have been returned normally.
Caution
The possible values of what
, and the indices of the returned arrays are defined in the include file <objectinfo.h>, and may change in future versions of the driver!
what
== OINFO_BASIC
:
This call returns basic information about
ob
:int [
OIB_HEART_BEAT
]: 1 ifob
has a heart_beat, 0 else. int [OIB_IS_WIZARD
]: 1 ifob
has the wizard flag set, 0 else. This entry is always 0 whenset_is_wizard
(E) is not available. int [OIB_ENABLE_COMMANDS
]: 1 ifob
can give commands, 0 else. int [OIB_CLONE
]: 1 ifob
is a clone, 0 else. int [OIB_DESTRUCTED
]: 1 ifob
is destructed, 0 else. int [OIB_SWAPPED
]: 1 ifob
is swapped, 0 else. int [OIB_ONCE_INTERACTIVE
]: 1 ifob
was once interactive, 0 else. int [OIB_RESET_STATE
]: 1 ifob
is (still) reset, 0 else. int [OIB_WILL_CLEAN_UP
]: 1 ifob
will callclean_up
(A), 0 else. int [OIB_LAMBDA_REFERENCED
]: 1 ifob
has lambdas, 0 else. int [OIB_SHADOW
]: 1 ifob
has a shadow structure tied to it, 0 if not. int [OIB_REPLACED
]: 1 if the program forob
was replaced, 0 else. int [OIB_NEXT_RESET
]: time of the next reset int [OIB_TIME_OF_REF
]: time of the last call toob
int [OIB_NEXT_CLEANUP
]: time of the next data cleanup int [OIB_REF
]: number of references toob
int [OIB_GIGATICKS
] and [OIB_TICKS
]: together, these numbers give the accumulated evaluation cost spend inob
int [OIB_SWAP_NUM
]: the swap number forob's
program, or -1 if not swapped. int [OIB_PROG_SWAPPED
]: 1 ifob
‘s program is swapped, 0 else. int [OIB_VAR_SWAPPED
]: 1 ifob
‘s variables are swapped, 0 else. int [OIB_NAME
]:ob
‘s object name. int [OIB_LOAD_NAME
]:ob
‘s load name. object [OIB_NEXT_ALL
]: next object in the object list. object [OIB_PREV_ALL
]: previous object in the object list.
what
== OINFO_POSITION
:
what
== OINFO_MEMORY
:
This call returns information about the program
ob
uses:int [
OIM_REF
]: number of references to the program. string [OIM_NAME
]: name of program. int [OIM_PROG_SIZE
]: size of the program. int [OIM_NUM_FUNCTIONS
]: number of functions in the program. int [OIM_SIZE_FUNCTIONS
]: size needed for the function structs. int [OIM_NUM_VARIABLES
]: number of variables in the program. int [OIM_SIZE_VARIABLES
]: size needed for the variable structs. int [OIM_NUM_STRINGS
]: number of strings in the program. int [OIM_SIZE_STRINGS
]: size needed for the string pointers. int [OIM_SIZE_STRINGS_DATA
]: size needed for the string data, scaled down according to the extend of data sharing. int [OIM_SIZE_STRINGS_TOTAL
]: unmodified size needed for the string data. int [OIM_NUM_INCLUDES
]: number of included files in the program. int [OIM_NUM_INHERITED
]: number of inherited programs. int [OIM_SIZE_INHERITED
]: size needed for the inherit structs. int [OIM_TOTAL_SIZE
]: total size of the program. int [OIM_DATA_SIZE
]: total size of the values held in the object’s variables, scaled down according to the extend of data sharing. int [OIM_DATA_SIZE_TOTAL
]: unmodified total size of the values held in the object’s variables int [OIM_NO_INHERIT
]: 1 if the program can’t be inherited. int [OIM_NO_CLONE
]: 1 if the program/blueprint can’t be cloned. int [OIM_NO_SHADOW
]: 1 if the program’s functions can’t be shadowed. int [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
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¶
- introduced (3.2.6)
- changed (3.2.7) –
- new basic result
OIB_REPLACED
. - basic result
OIB_IS_WIZARD
is always 0 ifset_is_wizard
(E) is not available. - basic result
OIB_APPROVED
is gone.
- new basic result
- changed (3.2.8) – added
OIM_DATA_SIZE
to the result ofOINFO_MEMORY
. - changed (3.2.9) – added the index mechanism,
OIM_NUM_INCLUDES
,OIM_NO_INHERIT
,OIM_NO_SHADOW
,OIM_NO_CLONE
,OIM_SIZE_STRINGS_DATA
,OIM_SIZE_STRINGS_TOTAL
, andOIM_DATA_SIZE_TOTAL
to the result ofOINFO_MEMORY
. - changed (3.3.378) – added the
OIM_SHARE_VARIABLES
to the result ofOINFO_MEMORY
. - changed (3.3.654) – added the
OIB_NEXT_CLEANUP
to the result ofOINFO_BASIC
.