All help topics · Link to this topic
Showing help on 'include_for_core'
$core_objects ([CORE_VARIANT_SPEC]) => object list
OBJECT:proxy_for_core ([CORE_VARIANT_SPEC, IN_MCD]) => object
OBJECT:include_for_core ([CORE_VARIANT_SPEC]) => property list
$core_objects() returns a list of those objects currently considered to be part of the core database.
See help 'make-core-database' for a description of the overall core database extraction process.
The list of core objects is determined by a traversal of properties starting with #0.sysobj (normally == #0).
If a given property being traversed is not object-valued or the object id is invalid we are done with that property.
Otherwise the property's value is a valid object and we call its 'proxy_for_core' verb, if one exists. Any such verb is expected to return an object id which will then be used to update this property and any others encountered in the traversal that likewise were pointing to the same object. If the verb does not exist we use the original property value (i.e., exactly as if the verbcode had been "return this;").
If the object thus obtained is valid, we add it to the list of core objects.
For each object added, we call its 'include_for_core' verb if one exists. Any such verb is expected to return a list of properties on that object, which are then recursively traversed as above. If the verb does not exist, no additional properties are traversed (i.e., exactly as if the verb had returned an empty list).
The traversal ends when there are no further properties to visit.
The CORE_VARIANT_SPEC argument is reserved for future use. For now, the value provided to $core_objects() is passed straight through to the various hook verbs (proxy/include) and otherwise ignored.
Note that the verb '$core_objects()' can be called at any time to see the full list of objects to be included in the core as per the above algorithm.
Note that proxy_for_core is only called once for any given object during the traversal. The IN_MCD parameter will be true for calls coming from within an actual run of make-core-database and false in all other invocations of $core_objects(). Thus, provided IN_MCD is true, it is safe for proxy_for_core to create an object to return.