/doc/efun/shadow


SYNOPSIS

object shadow(object ob, int flag)

DESCRIPTION

If flag is non-zero then the current object will shadow ob. If flag is 0 then either 0 will be returned or the object that is shadowing ob.

The calling object must be permitted by the master object to do the shadowing. In most installations, an object that defines the function query_prevent_shadow() to return 1 can't be shadowed, and the shadow() function will return 0 instead of ob. shadow() also fails if the calling object tries to shadow a function that was defined as ``nomask'', or if the calling object is already shadowing, is being shadowed, or has an environment. Also the target ob must not be shadowing something else.

If an object A shadows an object B then all call_other() to B will be redirected to A. If object A has not defined the function, then the call will be passed to B. There is only on object that can call functions in B with call_other(), and that is A. Not even object B can call_other() itself. All normal (internal) function calls inside B will however remain internal to B.

HISTORY

Up to 3.2.1@46, destructing a shadowed object also destructs all shadows. Since 3.2.1@47, shadows may survive the destruction of the shadowee (unless the prepare_destruct() in the master object destructs them manually).

SEE ALSO

query_shadowing
unshadow
query_allow_shadow

| Home | Applied | Concepts | Efuns | Help | Intro | Lib | LPC | Prop | Obj | Sefuns | Std | W |

Nightfall@quest.tat.physik.uni-tuebingen.de
Automatically generated on Don, 11. Apr 1996