The R Project SVN R

Rev

Rev 64662 | Rev 68948 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 64662 Rev 68104
Line 1... Line 1...
1
% File src/library/methods/man/RMethodUtils.Rd
1
% File src/library/methods/man/RMethodUtils.Rd
2
% Part of the R package, http://www.R-project.org
2
% Part of the R package, http://www.R-project.org
3
% Copyright 1995-2013 R Core Team
3
% Copyright 1995-2015 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{RMethodUtils}
6
\name{RMethodUtils}
-
 
7
\title{Method Utilities}
7
%% FIXME:  undocumented utilities (Sep. 23/02)
8
%% FIXME:  undocumented utilities (Sep. 23/02)
8
\alias{asMethodDefinition}
9
\alias{asMethodDefinition}
9
\alias{standardGeneric-class}
10
\alias{standardGeneric-class}
10
\alias{standardGenericWithTrace-class}
11
\alias{standardGenericWithTrace-class}
11
\alias{nonstandardGeneric-class}
12
\alias{nonstandardGeneric-class}
Line 46... Line 47...
46
\alias{.valueClassTest}
47
\alias{.valueClassTest}
47
\alias{insertClassMethods}
48
\alias{insertClassMethods}
48
%% Not for the user to know about!
49
%% Not for the user to know about!
49
\alias{.ShortPrimitiveSkeletons} %% used from C code
50
\alias{.ShortPrimitiveSkeletons} %% used from C code
50
\alias{.EmptyPrimitiveSkeletons}
51
\alias{.EmptyPrimitiveSkeletons}
51
\title{Method Utilities}
-
 
52
\description{
52
\description{
53
  Utility functions to support the definition and use of formal
53
  Utility functions to support the definition and use of formal
54
  methods.  Most of these functions will not normally be called directly
54
  methods.  Most of these functions will not normally be called directly
55
  by the user.
55
  by the user.
56
}
56
}
Line 91... Line 91...
91
 
91
 
92
setPrimitiveMethods(f, fdef, code, generic, mlist)
92
setPrimitiveMethods(f, fdef, code, generic, mlist)
93
 
93
 
94
missingArg(symbol, envir = parent.frame(), eval)
94
missingArg(symbol, envir = parent.frame(), eval)
95
 
95
 
96
balanceMethodsList(mlist, args, check = TRUE)
-
 
97
 
-
 
98
sigToEnv(signature, generic)
96
sigToEnv(signature, generic)
99
 
97
 
100
rematchDefinition(definition, generic, mnames, fnames, signature)
98
rematchDefinition(definition, generic, mnames, fnames, signature)
101
unRematchDefinition(definition)
99
unRematchDefinition(definition)
102
 
100
 
103
asMethodDefinition(def, signature, sealed = FALSE, fdef)
101
asMethodDefinition(def, signature, sealed = FALSE, fdef)
104
 
102
 
105
addNextMethod(method, f, mlist, optional, envir)
103
addNextMethod(method, f, mlist, optional, envir)
106
 
104
 
107
insertClassMethods(methods, Class, value, fieldNames, returnAll)
105
insertClassMethods(methods, Class, value, fieldNames, returnAll)
-
 
106
 
-
 
107
balanceMethodsList(mlist, args, check = TRUE) # <- deprecated since R 3.2.0
108
}
108
}
109
\section{Summary of Functions}{
109
\section{Summary of Functions}{
110
 
110
 
111
  \describe{
111
  \describe{
112
 
112
 
Line 226... Line 226...
226
      the argument.  (For method dispatch this is fine, because
226
      the argument.  (For method dispatch this is fine, because
227
      computations are done at the beginning of the call.)
227
      computations are done at the beginning of the call.)
228
    }
228
    }
229
 
229
 
230
    \item{\code{balanceMethodsList}:}{
230
    \item{\code{balanceMethodsList}:}{
-
 
231
      Used to be called from \code{setMethod()} and is \emph{deprecated}
-
 
232
      since \R version 3.2.0.
231
      Called from \code{\link{setMethod}} to ensure that all nodes in
233
    %%   Called from \code{\link{setMethod}} to ensure that all nodes in
232
      the list have the same depth (i.e., the same number of levels of
234
    %%   the list have the same depth (i.e., the same number of levels of
233
      arguments).  Balance is needed to ensure that all necessary
235
    %%   arguments).  Balance is needed to ensure that all necessary
234
      arguments are examined when inherited methods are being found and
236
    %%   arguments are examined when inherited methods are being found and
235
      added to the \code{allMethods} slot.  No actual recomputation is
237
    %%   added to the \code{allMethods} slot.  No actual recomputation is
236
      needed usually except when a new method uses a longer signature
238
    %%   needed usually except when a new method uses a longer signature
237
      than has appeared before.
239
    %%   than has appeared before.
238
 
240
 
239
      Balance requires that \emph{all} methods be added to the generic
241
    %%   Balance requires that \emph{all} methods be added to the generic
240
      via \code{setMethod} (how else could you do it?) or by the initial
242
    %%   via \code{setMethod} (how else could you do it?) or by the initial
241
      \code{setGeneric} call converting the ordinary function.
243
    %%   \code{setGeneric} call converting the ordinary function.
242
    }
244
    }
243
 
245
 
244
    \item{\code{sigToEnv}:}{
246
    \item{\code{sigToEnv}:}{
245
      Turn the signature (a named vector of classes) into an environment
247
      Turn the signature (a named vector of classes) into an environment
246
      with the classes assigned to the names.  The environment is then
248
      with the classes assigned to the names.  The environment is then