




 
Defines an implementation class for an Automation component that supports the Collection protocol.
define-automation-collection class-name (superclass-name*)
                             (slot-specifier*) class-option*
A symbol naming the class to define.
A symbol naming a superclass to inherit from.
A slot description as used by defclass.
An option as used by defclass.
The macro define-automation-collection defines a standard-class which is used to implement an Automation component that supports the Collection protocol. Normal defclass inheritance rules apply for slots and Lisp methods.
Each superclass-name argument specifies a direct superclass of the new class, which can be any standard-class provided that standard-automation-collection is included somewhere in the overall class precedence list. This standard class provides a framework for the collection class.
slot-specifiers are standard defclass slot definitions.
class-options are standard defclass options. In addition the following options are recognized:
This option is required. The component will implement the interface-name, which must be an Automation Collection interface, containing (at least) the standard properties Count and _NewEnum. The macro will define an implementation of these methods using information from the instance of the class to count and iterate.
(:item-method item-method-name*)
When specified, a COM method named item-method-name will be defined that will look up items using the item-lookup-function from the instance.
If not specified, the method will be called Item. For Collections which do not have an item method, pass nil as the item-method-name.
LispWorks COM/Automation User Guide and Reference Manual - 23 Mar 2017