COMSNamedFunctionObject: Create COM dispatch mechanism for COMSNamedFunctionClass...

SCOMNamedFunctionDispatchR Documentation

Create COM dispatch mechanism for COMSNamedFunctionClass instance

Description

This function is used to create a dispatch mechanism for an instance of an S COM object created from a SCOMNamedFunctionClass-class definition object. This provides an invocation mechanism to handle calls to the methods in the COM object and also a mapping of the names of methods, properties and parameters to integers and back.

Usage

SCOMNamedFunctionDispatch(funs, properties, propertyNames, nameMgr = COMNameManager())

Arguments

funs

a named character vector. The names are those used by COM clients to refer to methods in the COM server. The correspoding element in the vector is the name of the S function to invoke for that method name.

properties

a list of named values that act as local properties for the instance of the COM server

propertyNames

a character vector giving the names of S variables that act as additional global or shared properties for the COM objects.

nameMgr

a function that performs all of the name-identifer mapping for properties. This function should work on numbers and return the corresponding names, names and return the corresponding identifiers, and if called with no arguments return the current map as a named integer vector. See COMNameManager. This is made accessible as an argument primarily so that one can provide a COMNameManager function that is initialized with a particular mapping, say computed from a type library.

Value

A list with two functions that act as the invocation and name manager for the COM dispatch mechanism.

Invoke

the invocation function that handles calls to methods and properties by COM clients.

GetNamesOfIDs

the name mapper that is called by the client to map a name to an integer identifier.

Author(s)

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

References

http://www.omegahat.org/RDCOMServer

See Also

SCOMNamedFunctionClass-class SCOMNamedFunctionClass createCOMObject


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