[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

After you've stored your LCI in a ContextNode, you will no doubt want to
be able to find it again later.  You do this with the function
FindLocalItem(), which is called as follows:

    lci = FindLocalItem (iff, type, id, ident);

FindLocalItem() attempts to locate an LCI having the specified type, ID,
and identification values.  The search proceeds as follows (refer to
Figure 33-3 to understand this better).

FindLocalItem() starts at the top (current) ContextNode and searches all
LCIs in that context.  If no matching LCIs are found, it proceeds down the
context stack to the next ContextNode and searches all its LCIs.  The
process repeats until it finds the desired LCI (whereupon it returns a
pointer to it), or reaches the end without finding anything (where it
returns NULL).

    Context Stack Position.
    -----------------------
    LCIs higher in the stack will "override" lower LCIs with the
    same type, ID, and identification field.  This is how property
    scoping is handled.  As ContextNodes are popped off the context
    stack, all its LCIs are deleted as well.  See the section on
    "Freeing LCIs" below for additional information on deleting LCIs.