The R Project SVN R

Rev

Rev 64662 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
42333 ripley 1
% File src/library/methods/man/SClassExtension-class.Rd
68948 ripley 2
% Part of the R package, https://www.R-project.org
64662 ripley 3
% Copyright 1995-2013 R Core Team
42333 ripley 4
% Distributed under GPL 2 or later
5
 
20332 jmc 6
\name{SClassExtension-class}
7
\docType{class}
56186 murdoch 8
\alias{SClassExtension-class}
20332 jmc 9
\title{Class to Represent Inheritance (Extension) Relations }
42963 ripley 10
\description{  An object from this class represents a single \sQuote{is}
20332 jmc 11
  relationship; lists of these objects are used to represent all the
12
  extensions (superclasses) and subclasses for a given class.  The
13
  object contains information about how the relation is defined and
14
  methods to coerce, test, and replace correspondingly. }
15
\section{Objects from the Class}{
39342 jmc 16
  Objects from this class are generated by \code{\link{setIs}},
17
  from direct calls and from the \code{contains=} information in a call to \code{\link{setClass}}, and from class unions created by \code{\link{setClassUnion}}.
18
  In the last case, the information is stored in defining the \emph{subclasses} of the union class (allowing unions to contain sealed classes).
20332 jmc 19
}
20
\section{Slots}{
21
  \describe{
62069 hornik 22
    \item{\code{subClass}, \code{superClass}:}{The classes being
23
      extended: corresponding to the \code{from}, and \code{to}
24
      arguments to \code{\link{setIs}}. }
20332 jmc 25
    \item{\code{package}:}{The package to which that class belongs. }
26
    \item{\code{coerce}:}{A function to carry out the as() computation
27
    implied by the relation.  Note that these functions should
28
    \emph{not} be used directly.  They only deal with the
29
    \code{strict=TRUE} calls to the \code{\link{as}} function, with
30
    the full method constructed from this mechanically. }
31
    \item{\code{test}:}{The function that would test whether the
32
    relation holds.  Except for explicitly specified \code{test}
33
    arguments to \code{\link{setIs}}, this function is trivial. }
34
    \item{\code{replace}:}{The method used to implement \code{as(x,
35
    Class) <- value}.}
36
    \item{\code{simple}:}{A \code{"logical"} flag, \code{TRUE} if this
37
    is a simple relation, either because one class is contained in the
38
    definition of another, or because a class has been explicitly
39
    stated to extend a virtual class.  For simple extensions, the
40
    three methods are generated automatically.}
41
    \item{\code{by}:}{If this relation has been constructed
42
    transitively, the first intermediate class from the subclass. }
43
    \item{\code{dataPart}:}{A \code{"logical"} flag, \code{TRUE} if
44
  the extended class is in fact the data part of the subclass.  In
45
  this case the extended class is a basic class (i.e., a type). }
39016 jmc 46
    \item{\code{distance}:}{The distance between the two classes,
47
    1 for directly contained classes, plus the number of generations between otherwise. }  }
20332 jmc 48
}
49
 
50
\section{Methods}{
23531 hornik 51
  No methods defined with class \code{"SClassExtension"} in the
52
  signature.
20332 jmc 53
}
23531 hornik 54
\seealso{
55
  \code{\link{is}},
44751 maechler 56
  \code{\link{as}}, and the
57
  \code{\linkS4class{classRepresentation}} class.
23531 hornik 58
}
20332 jmc 59
\keyword{classes}