The R Project SVN R

Rev

Rev 85927 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
42333 ripley 1
% File src/library/methods/man/setSClass.Rd
68948 ripley 2
% Part of the R package, https://www.R-project.org
69446 ripley 3
% Copyright 1995-2015 R Core Team
42333 ripley 4
% Distributed under GPL 2 or later
5
 
20620 jmc 6
\name{makeClassRepresentation}
56186 murdoch 7
\alias{makeClassRepresentation}
23531 hornik 8
\title{Create a Class Definition}
15357 jmc 9
\description{
44751 maechler 10
  Constructs an object of class \code{\linkS4class{classRepresentation}}
11
  to describe a particular class.  Mostly a utility function, but you can
23531 hornik 12
  call it to create a class definition without assigning it, as
13
  \code{\link{setClass}} would do.
15357 jmc 14
}
15
\usage{
20620 jmc 16
makeClassRepresentation(name, slots=list(), superClasses=character(),
23531 hornik 17
                        prototype=NULL, package, validity, access,
26093 jmc 18
                        version, sealed, virtual=NA, where)
15357 jmc 19
}
20
\arguments{
23531 hornik 21
  \item{name}{character string name for the class}
22
  \item{slots}{named list of slot classes as would be supplied to
23
    \code{setClass}, but \emph{without} the unnamed arguments for
85927 hornik 24
    \code{superClasses} if any.}
23531 hornik 25
  \item{superClasses}{what classes does this class extend}
26
  \item{prototype}{an object providing the default data for the class,
69446 ripley 27
    e.g., the result of a call to \code{\link{prototype}}.}
23531 hornik 28
  \item{package}{The character string name for the package in which
29
    the class will be stored; see \code{\link{getPackageName}}.}
20620 jmc 30
  \item{validity}{Optional validity method.  See
23531 hornik 31
    \code{\link{validObject}}, and the discussion of validity methods in
32
    the reference.}
33
  \item{access}{Access information.  Not currently used.}
34
  \item{version}{Optional version key for version control.  Currently
35
    generated, but not used.}
36
  \item{sealed}{Is the class sealed? See \code{\link{setClass}}.}
37
  \item{virtual}{Is this known to be a virtual class?}
26093 jmc 38
 
39
  \item{where}{The environment from which to look for class
40
      definitions needed (e.g., for slots or superclasses). See the
41
      discussion of this argument under \link{GenericFunctions}.}
15357 jmc 42
}
43
\references{
88585 hornik 44
  \bibshow{R:Chambers:2008}
45
  (For the R version.)
15357 jmc 46
 
88585 hornik 47
  \bibshow{R:Chambers:1998}
48
  (For the original S4 version.)
15357 jmc 49
}
23531 hornik 50
\seealso{
51
  \code{\link{setClass}}
52
}
15357 jmc 53
\keyword{programming}
54
\keyword{classes}