COMSIDispatchObject: S-level IDispatch Mechanism for S-COM

COMSIDispatchObjectR Documentation

S-level IDispatch Mechanism for S-COM

Description

This function is closely associated with the SCOMEnvironmentClass-class and SCOMFunctionClass classes and provides the necessary functionality to control the COM invocation of methods and accessing of properties for an S-COM object. This provides S functions that implement the Invoke and GetIDsOfNames methods for the COM object. The GetIDsOfNames maps COM names to unique identifiers and Invoke handles the accessing of methods and properties in the S-level object underlying the S-COM object.

Usage

COMSIDispatchObject(funs, properties = character(0), guids = character(),
	             .propertyEnvironment = environment(funs[sapply(funs, is.function)][[1]]))

Arguments

funs

a named list of the functions that are to be used as methods, and a .properties elements that give the names of the variables within .propertyEnvironment that are to be treated as properties.

properties

a character vector giving the names of the variables in the environment which are to be treated as properties of the COM object. This is used if it is supplied and there is no .properties element in funs.

guids

a character vector of the UUIDs that this server object will admit to supporting/implementing. These are used when clients call the QueryInterface method of the server.

.propertyEnvironment

the environment in which to find the properties. By default, this is taken as the environment of the first function in the list of methods, i.e. funs.

Details

This computes the list of all names in the properties, and functions and their parameters. (This means that named values in ... are currently not permitted, however this is easy to change.) and computes a map to use for associating names and identifiers. These are used by the client to map a name to an identifier and use that in calls.

Value

A list of two functions that can be passed to the constructor of the C++ class RCOMSObject via the C routine R_RCOMSObject. The functions are the Invoke and GetIDsOfNames.

Author(s)

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

References

http://www.omegahat.org/RDCOMServer http://www.omegahat.org/SWinRegistry

See Also

computeCOMNames


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