[DGD] call_touch

Shentino shentino at gmail.com
Wed Sep 10 06:57:17 CEST 2008


Let me provide a demonstration of call_touch then.

Normal

top:
   obj->function(stuff)
obj::function:
   blah blah

With call touch

top:
   call_touch(obj);
   obj->function(stuff);
DGD:
   driver->touch(obj, function)
Driver::touch
   (whatever...)
   If return 1, obj is still "call touch" active
DGD:
   obj->function(stuff);
obj::function
   blah...

Not really any call chains.

What's going on is that whenever you try to call a function on a call
touch'ed object, the driver notices that you're trying to handle a
touched object, and interrupts the call, then gives the driver object
a ring.  After the driver object returns, the original call to the
call-touch'ed object proceeds as normal.

If you call function "X" on object "Y", and object "Y" is
call-touch'ed, then the driver will get a call from the server to its
touch founction, which will receive a string of "X" and an objext of
"Y", specifing both what touched object was about to  be called, as
well as the name of the function that was targeted.

Play aroudn with call_touch, driver::touch(), and so on, and you'll
probably be able to see what's happening.



More information about the DGD mailing list