SCOMIDispatch-class: Typical COM server class representation

SCOMIDispatch-classR Documentation

Typical COM server class representation

Description

This class is a simple extension of SCOMEnvironmentClass-class and so it supports having a generator function that is used to create each instance of the COM object at the S level (e.g. creating unique function lists for each instance that share a common environment with each other but separate from other instances).

The only difference between this and SCOMEnvironmentClass-class is that we use a different dispatch mechanism for the two classes. For this class, we use the more complete and easier-to-understand S function COMSIDispatchObject to create both the dispatch mechanism that handles method invocation for the object, and the mapping of names to integers and back. The SCOMEnvironmentClass-class uses a C++-level mechanism and should not be used at this point.

Objects from the Class

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

Slots

generator

Inherited from SCOMEnvironmentClass-class

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 "SCOMEnvironmentClass", directly. Class "SCOMClass", by class "SCOMEnvironmentClass".

Methods

createCOMObject

signature(def = "SCOMIDispatch"): create an instance of the COM server and the associated C++ object that makes the server available to clients.

Author(s)

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

References

http://www.omegahat.org/RDCOMServer

See Also

createCOMObject SCOMIDispatch SCOMEnvironmentClass-class

Examples

## Not run: 
 gen = function(mu = 0, sd = 1) {
         list(sample=function(n) rnorm(n, mu, sd),
              quantiles=function(p) qnorm(p, mu, sd)
             )
       }

 def = SCOMIDispatch(gen, "SimpleNormal")
 registerCOMClass(def)

## End(Not run)

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