Rev 15439 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{MethodSupport}\alias{setGeneric}\alias{evalSelectedMethod}\alias{OldEvalSelectedMethod}\alias{getMethodsForDispatch}\alias{hasMethod}\alias{resetGeneric}\title{Additional (Support) Functions for Methods}\usage{setGeneric(name, def, group=NULL, valueClass=NULL, where=1)evalSelectedMethod(f, ev, fname)getMethodsForDispatch(f)hasMethod(f, signature=character())resetGeneric(f)}\description{\describe{\item{\code{setGeneric}:}{Define \code{name} to be a generic function, for which methods will be defined.If there is already a non-generic function of this name, it will be usedto define the generic unless \code{def} is supplied, and the current function willbecome the default method for the generic.If \code{def} is supplied, this defines the generic function. The default method fora new generic will usually be an existing non-generic. See the .Rd page}\item{\code{evalSelectedMethod}:}{Evaluate the selected method, f, in the environment, ev.The general case is that f is a closure (an ordinary function), in which casethe body is evaluated in the given environment.The special cases (primitive and internal) have to be faked by going back to theenvironment of the call to the generic.}\item{\code{hasMethod}:}{returns \code{TRUE} if \code{f} is the name of a generic function with an (explicit) method forthis signature.}\item{\code{resetGeneric}:}{reset the currently defined methods for this generic by un-caching any inheritedmethods.You \emph{must} call this function when you change relevant inheritance information during asession, to guarantee that the new information is used if this generic has already beencalled.}}}\keyword{programming}