SCOMIDispatch-class {RDCOMServer}R 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

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@research.bell-labs.com>

References

http://www.omegahat.org/RDCOMServer

See Also

createCOMObject SCOMIDispatch SCOMEnvironmentClass-class

Examples


 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)


[Package Contents]