SCOMFunctionClass-class: COM definition using named function list

SCOMFunctionClass-classR Documentation

COM definition using named function list

Description

This class allows one to define different COM classes by grouping S function objects together that act as methods. These functions can but need not share an environment. The key thing is that they are shared across different instances of the COM class, unlike SCOMEnvironmentClass-class servers which have different instances of the functions and their environments for each object.

Unlike the SCOMIDispatch constructor, this definition does not have a generator function but instead re-uses the list of functions for each COM object that is created for this class. In this way, they cannot share state.

The properties are currently accessed as variables in the global environment and are specified simply as variable names. A variant of this class will allow them to be local to the object and specified as a list.

Objects from the Class

Objects can be created by calls of the form new("SCOMFunctionClass", ...).

Slots

functions:

Object of class "list" this is a named list of functions. The names are used to identify the methods when dispatching the invocation by COM clients. The methods are implemented by the particular functions. The functions can share an environment, however there is no generator function to create separate instances of these functions for each COM object. Thus the environment would be shared across all objects, i.e. static methods.

properties:

Object of class "character" this is a vector giving the names of the top-level/global variables that are to be made accessible as properties of the COM server.

classId

Inherited from SCOMClass-class

guids

Inherited from SCOMClass-class

help

Inherited from SCOMClass-class

version

Inherited from SCOMClass-class

name

Inherited from SCOMClass-class

progId

Inherited from SCOMClass-class

Extends

Class "SCOMClass", directly.

Methods

createCOMObject

signature(def = "SCOMFunctionClass"): a method that creates an instance of this server as a C++ object along with a dispatch function to invoke the methods in the functions list.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

http://www.omegahat.org/RDCOMServer

See Also

createCOMObject SCOMEnvironmentClass-class SCOMNamedFunctionClass-class


omegahat/RDCOMServer documentation built on July 17, 2022, 7:25 p.m.