Next: , Previous: , Up: Referable Objects   [Index]


4.2.7.5 Reference Tracking Mechanics

Objects tracking references to themselves maintain a list of references, a list in which each item corresponds a tracked reference. The list items identify the objects holding the references by the address of one of their attribute. The latter is typed as struct x1f4_nodelink_type.

See struct x1f4_nodelink_type.

Objects in the libaime type system (those that may hold references and be themselves referred) embed thus a struct x1f4_nodelink_type record. The address at which this record is stored is offered to the referred objects for up tracing purposes.

See Detecting Cycles.

The maintained references list is a list of pointers to struct x1f4_nodelink_type records.

The embedded struct x1f4_nodelink_type record needs to be set up before it is published.

Its slip field is the flag space required for tracking the already visited references when running the cycle detection algorithm and needs be NULL outside the cycle detection algorithm.

The other struct x1f4_nodelink_type record field, miss, is the address of the routine determining whether the object (which embeds the struct x1f4_nodelink_type record) is variable referred. The method is expected to return a non zero value if the object is variable referred, zero otherwise.

When called, the routine indicated by the miss field will be supplied with

as arguments, in this order.

What such routine would do is:


Next: , Previous: , Up: Referable Objects   [Index]