Learn R Programming

RPPASPACE (version 1.0.10)

registrationMethods: Generic Registration Methods

Description

These routines represent the lower-level access for registration, which enables data-driven access by other routines. This represents the initial implementation and may change in the future.

Usage

getRegisteredObject(key,
                    envir,
                    objtype=c("method", "classname"))
getRegisteredObjectKeys(envir)
getRegisteredMethodKeys(envir)
getRegisteredMethod(key, envir)
registerClassname(key, classname, ..., envir)
registerMethod(key, method, ..., envir)

Value

getRegisteredObject returns list associated with key. List components will include named arguments provided upon registration.

getRegisteredObjectKeys returns vector of keys for all registered objects.

registerClassname is invoked for its side effect, which is registering

classname (and optionally other named arguments) by association to

key.

registerMethod is invoked for its side effect, which is registering

method (and optionally other named arguments) by association to

key.

Arguments

key

character string representing a registered object

envir

environment where registered objects are stored

objtype

character string specifying type of registered object

method

function to register

classname

character string specifying class name to register

...

extra arguments for generic routines

Author

P. Roebuck paul_roebuck@comcast.net, James M. Melott jmmelott@mdanderson.org

Details

The routines here basically use the envir passed by the caller as a private hash table. The key argument is used to retrieve the value stored during registration.

getRegisteredMethodKeys is an alias for getRegisteredObjectKeys. getRegisteredMethod invokes getRegisteredObject with objtype of "method".

See Also

The envir argument of eval, get, and exists.

assign, get