NextPrevUpTopContentsIndex

define-automation-collection

Macro
Summary

Defines an implementation class for an Automation component that supports the Collection protocol.

Package

com

Signature

define-automation-collection class-name ( superclass-name* )
( slot-specifier* ) class-option*

Arguments

class-name

A symbol naming the class to define.

superclass-name

A symbol naming a superclass to inherit from.

slot-specifier

A slot description as used by defclass .

class-option

An option as used by defclass .

Description

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-specifier s are standard defclass slot definitions.

class-option s are standard defclass options. In addition the following options are recognized:

(:interface interface-name )

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, call nil as the item-method-name.

Example

 

See also

define-automation-component
standard-automation-collection


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

NextPrevUpTopContentsIndex