COMIDispatch-class {RDCOMClient}R Documentation

Representation of generic COM object in R

Description

These classes are used to represent in S an arbitrary COM object. IUnknown is the most basic and provides us with very little information about the underlying COM object. COMIDispatch is the work-horse for this package and provides a mechanism by which one can access the methods and properties of the COM object using the IDispatch interface, i.e. dynamic bindings rather than compiled ones.

COMIDispatch is a trivial extension of IUnknown that provides type information which we use to dispatch methods. The IUnknown class is merely a reference to the C/C++-level COM object.

Reference counting is done automatically in the C code so that the COM object should persist as long as there is an S object that refers to it and will be released when no S value refers to it. Of course, other clients can clobber the COM object and the S references will be meaningless.

Objects from the Class

Objects can be created by calls of the form COMCreate or implicitly when a COM object is returned from a COM method call.

Slots

ref:
Object of class "externalptr" this is the C++ value identifying the COM object.

Methods

$
signature(x = "COMIDispatch"): accessor for a method in the COM object. This returns a function that can be used to invoke the named method See $ in COMAccessors
$<-
signature(x = "COMIDispatch"): generates an error as one cannot assign to a function/method. This is implemeted this way for symmetry so that assigning to a property (x[["foo"]] <- 1) has the same basic syntax as accessing it x[["foo"]]. If we made this operator a property assignment, we would have x$foo <- 1 work but x$foo failing. See COMAccessors
[[
signature(x = "COMIDispatch"): access a property. See COMAccessors
[[<-
signature(x = "COMIDispatch"): set a property value. See COMAccessors

Author(s)

Duncan Temple Lang (duncan@research.bell-labs.com)

References

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

See Also

COMCreate

Examples



[Package RDCOMClient version 0.8-1 Index]