All Manuals > COM/Automation User Guide and Reference Manual > 4 Automation Reference Entries

simple-i-dispatch-callback-object Generic Function

Summary

A generic function that can be implemented to modify the first argument to the invoke-callback in simple-i-dispatch.

Package

com

Signature

simple-i-dispatch-callback-object this => object

Method signatures

simple-i-dispatch-callback-object (this simple-i-dispatch)

Arguments
this
An object of type simple-i-dispatch.
Values
object
The callback object to be pass as the first argument to the invoke-callback of this.
Description

The generic function simple-i-dispatch-callback-object is called by the implementation of simple-i-dispatch to obtain the callback object (first argument) to the invoke-callback of this. This allows the object to be computed in some way by subclassing simple-i-dispatch and implementing a method on simple-i-dispatch-callback-object specialized for the subclass.

The pre-defined primary method specializing on simple-i-dispatch always returns its argument.

Examples

When the function my-dispatch-callback below is called, its first argument will be the useful-object passed to make-my-dispatch.

(defclass my-dispatch (simple-i-dispatch)
  ((useful-object :initarg :useful-object)))
 
(defmethod simple-i-dispatch-callback-object
    ((this my-dispatch))
  (slot-value this 'useful-object))
 
(defun make-my-dispatch (useful-object)
  (make-instance
   'my-dispatch
   :useful-object useful-object
   :invoke-callback 'my-dispatch-callback
   :interface-name "MyDispatchInterface"))
See also

simple-i-dispatch


COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41