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

NextPrevUpTopContentsIndex

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

this => object

Method signature

(this simple-i-dispatch) => this

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 its invoke-callback. 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.

Example

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


LispWorks COM/Automation User Guide and Reference Manual - 23 Mar 2017

NextPrevUpTopContentsIndex