| Line 112... |
Line 112... |
| 112 |
|
112 |
|
| 113 |
If no definition is found, throws an
|
113 |
If no definition is found, throws an
|
| 114 |
error or returns \code{NULL} according to the value of
|
114 |
error or returns \code{NULL} according to the value of
|
| 115 |
\code{mustFind}. By default, searches in the top-level
|
115 |
\code{mustFind}. By default, searches in the top-level
|
| 116 |
environment (normally the global environment, but adjusted to
|
116 |
environment (normally the global environment, but adjusted to
|
| 117 |
work correctly when package code is evaluated from the function \code{\link{library}}.
|
117 |
work correctly when package code is evaluated from the function
|
| - |
|
118 |
\code{\link{library}}).
|
| 118 |
|
119 |
|
| 119 |
Primitive functions are dealt with specially, since there is never
|
120 |
Primitive functions are dealt with specially, since there is never
|
| 120 |
a formal generic definition for them. The value returned is the
|
121 |
a formal generic definition for them. The value returned is the
|
| 121 |
formal definition used for assigning methods to this primitive.
|
122 |
formal definition used for assigning methods to this primitive.
|
| 122 |
Not all primitives can have methods; if this one can't, then
|
123 |
Not all primitives can have methods; if this one can't, then
|
| Line 266... |
Line 267... |
| 266 |
corresponding the method definition \code{method} and adds the
|
267 |
corresponding the method definition \code{method} and adds the
|
| 267 |
method to the methods list, which it then returns. It uses
|
268 |
method to the methods list, which it then returns. It uses
|
| 268 |
methods defined suitably for ordinary methods and for methods with
|
269 |
methods defined suitably for ordinary methods and for methods with
|
| 269 |
calls to \code{\link{callNextMethod}}.
|
270 |
calls to \code{\link{callNextMethod}}.
|
| 270 |
}
|
271 |
}
|
| 271 |
}
|
- |
|
| 272 |
|
272 |
|
| 273 |
\item{\code{makeGeneric}:}{
|
273 |
\item{\code{makeGeneric}:}{
|
| 274 |
Makes a generic function object corresponding to the given
|
274 |
Makes a generic function object corresponding to the given
|
| 275 |
function name, optional definition and optional default method.
|
275 |
function name, optional definition and optional default method.
|
| 276 |
Other arguments supply optional elements for the slots of
|
276 |
Other arguments supply optional elements for the slots of
|
| Line 349... |
Line 349... |
| 349 |
is a .Primitive. (Because primitives don't behave correctly as
|
349 |
is a .Primitive. (Because primitives don't behave correctly as
|
| 350 |
ordinary functions, not having either formal arguments nor a
|
350 |
ordinary functions, not having either formal arguments nor a
|
| 351 |
function body).
|
351 |
function body).
|
| 352 |
}
|
352 |
}
|
| 353 |
|
353 |
|
| - |
|
354 |
}
|
| 354 |
}
|
355 |
}
|
| 355 |
\keyword{internal}
|
356 |
\keyword{internal}
|