GetCOMClassDef | R Documentation |
This function is called by a COM factory to create an instance of a particular COM class defined in S when such an object is requested by a client. This looks for the information to create the COM object in two ways.
Firstly, it attempts to look in the registry for
the class entry for the given UUID identifier.
If this exists, it looks for entries for
profile
to see if there is an S script
that it should execute before creating the server.
This can be used to initialize the R session appropriately
so that packages, methods, data, etc. are available to support
the server.
It then checks to see if there is an entry in the registry
named rda
and if so, deserializes the file given by
that entries value. The first object from deserializing is
used as the COM server object.
If no rda
entry exists but there is an entry
named Svariable
, we then attempt to retrieve
the S object that is currently bound/assigned to that variable
and use that.
The typical mechanism does not use rda
or Svariable
entries. Instead, the developer of a COM server in S
registers the server definition using
registerCOMClass
. GetCOMClassDef
then uses the UUID passed to it to find the definition
in a list of such server definitions. This list
is stored in a serialized S object residing on the system
and created during the call to registerCOMClass
.
GetCOMClassDef(clsid, rda = getCOMClassDefFileName(), verbose = FALSE)
clsid |
the UUID identifying the particular COM class definition.
This is an object of class uuid from the |
rda |
the name of an R data file containing the serialized object giving the list of COM class definitions. |
verbose |
a logical value indicating whether to write diagnostic messages about progress to the console. |
An object that "defines" an S COM server
which can be passed to createCOMObject
.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/RDCOMServer http://www.omegahat.org/SWinRegistry
registerCOMClass
createCOMObject
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.