getElements | R Documentation |
getElements
is a function that serves as a
general convenient
way to extract the "relevant" elements from
a type library or an element within a type library.
For a type library, the relevant elements are
descriptions of all the classes in the form
of a list of ITypeInfo-class
.
When applied to one of these
ITypeInfo-class
itself,
getElements
accesses the sub-elements
such as the methods and property accessors
for a ITypeInfoDispatch-class
object, or the collection of
ITypeInfoDispatch-class
for a ITypeInfoCoClass-class
object.
If the object is an enumeration (ITypeInfoEnum-class
),
this function returns the collection of associated named constants.
getEnum
is the actual function
that processes ITypeInfoEnum-class
elements within a
type library to get the "elements".
getFuncs
is used for
ITypeInfoDispatch-class
library elements.
getElements(x, recursive = FALSE)
getEnum(x)
x |
an object of class |
recursive |
a logical value |
getElements
returns a list.
Depending on the type of the ITypeInfo-class
,
different information is returned.
getEnum
returns a named integer vector.
The names of the vector's elements
give the symbolic names of the constants as used in the C/C++ code.
These are more readable and more robust than using separate values.
The values are the values of the symbolic constants
used in the C/C++ code.
See EnumValue
.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://msdn.microsoft.com/library http://www.omegahat.org/SWinTypeLibs
getFuncs
LoadTypeLib
## Not run:
e = getCOMInstance("Excel.Application")
lib = LoadTypeLib(e)
# CoClass
getElements(lib[["Application"]])
# Methods of an IDispatch type
getElements(lib[["_Application"]])
# Same thing.
getFuncs(lib[["_Application"]])
# Enumeration.
getElements(lib[["Constants"]])
getEnum(lib[["Constants"]])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.