theSq3Lite 10.0
|
List of all callback defined by atlsq3lite
The callback is a regular ATL proc that either stands alone or is part of a class.
The callback is a list: [list ?class::?callback ?instance? args...]
, with automatic callback-name resolution occurs in the following order:
If automatic resolution does NOT produce the desired result, the callback can of course always be specified with the absolute-namespace.
ATL also allows additional parameters to be passed to the callback, for example, to support a specific implementation. These parameters are added at the end of the callback-call.
Example: The instance-callback with two default-arguments (arg1
and arg2
), defined as:
define-callback-command [list callback instance add1 add2 add3]
results in the following callback call:
::class::callback instance arg1 arg2 add1 add2 add3
Example about the delete-callback-setup from the RPC server example/atl/LibSq3LiteRpcServer.atl
ServerSetup : The DeleteCallback is usually installed in the Setup-Callback but only once.
if {[ConfigGetIsParent $myNs ]} { MkObjectC::DeleteCallbackSetup "LibSq3LiteRpcServer" [list ObjectDeleteCall $myNs] "^Sq3" }
The DeleteCallback is called before the deletion. In the RPC example, the RPC client is informed about the impending deletion.
proc LibSq3LiteRpcServer::ObjectDeleteCall { myNs typeName typeHdl objHdl } { Send $myNs "E" "%DEL:CHH" $typeName $typeHdl $objHdl }
ServerCleanup : If the RPC server is deleted, the DeleteCallback is no longer needed and is therefore also deleted.
if {[ConfigGetIsParent $myNs ]} { MkObjectC::DeleteCallbackCleanup "LibSq3LiteRpcServer" }