theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - jv - cc
Loading...
Searching...
No Matches
Callback Signature List

List of all callback defined by TclMkKernel

The callback have to be a Tcl proc or method

Callback signature

[static] proc callback { obj:MkObjectC[in] ?additional-args...? } ...
[instance] ::oo::class create XXX {
superclass MkObjectC
method callback { obj:MkObjectC[in] ?additional-args...? } ...
[other] ::oo::class create YYY {
method callback { obj:MkObjectC[in] ?additional-args...? } ...
[class] ::oo::class create ZZZ {
self method callback { obj:MkObjectC[in] ?additional-args...? } ...

Read more about how to define a service-callback in theLink .

Callback example

Example about the delete-callback-setup from the RPC server example/tcl/LibSq3LiteRpcServer.tcl

ServerSetup : The DeleteCallback is usually installed in the Setup-Callback but only once.

    if {[my ConfigGetIsParent]} {
      # call “ObjectDeleteCall” ONLY when deleting an instance whose class name matches the regular expression “^Sq3”
      MkObjectC DeleteCallbackSetup "LibSq3LiteRpcServer" [list [self] ObjectDeleteCall] "^Sq3"
    }

The DeleteCallback is called before the deletion. In the RPC example, the RPC client is informed about the impending deletion.

oo::define LibSq3LiteRpcServer method ObjectDeleteCall { obj } {
  my Send "E" "%DEL:CCIH" [my ConfigGetName] [$obj ToNameOfType] [$obj HandleGetOfType] [$obj HandleGet]
}
oo::define LibSq3LiteRpcServer export ObjectDeleteCall

ServerCleanup : If the RPC server is deleted, the DeleteCallback is no longer needed and is therefore also deleted.

    if {[my ConfigGetIsParent]} {
      MkObjectC DeleteCallbackCleanup "LibSq3LiteRpcServer"
    }

Callbacks defined by TclMkKernel

Global MkObjectDeleteCallbackSetup_RT (MK_RT const mkrt, MK_STRN ident, MkObjectDeleteCallF fCall, MK_CBP callback, MkObjectDeleteFreeF fFree, MK_STRN filter)
MkObjectDeleteCallbackSetup