Rev 42766 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/methods/man/classRepresentation-class.Rd% Part of the R package, http://www.R-project.org% Copyright 1995-2007 R Core Development Team% Distributed under GPL 2 or later\name{classRepresentation-class}\docType{class}\alias{classRepresentation-class}\title{Class Objects }\description{ These are the objects that hold the definition ofclasses of objects. They are constructed and stored as meta-data bycalls to the function \code{\link{setClass}}. Don't manipulate themdirectly, except perhaps to look at individual slots. }\section{Slots}{\describe{\item{\code{slots}:}{A named list of the slots in this class; theelements of the list are the classes to which the slots mustbelong (or extend), and the names of the list gives thecorresponding slot names.}\item{\code{contains}:}{A named list of the classes this class\sQuote{contains}; the elements of the list are objects of\code{\link{SClassExtension-class}}. The list may be only thedirect extensions or all the currently known extensions (see thedetails).}\item{\code{virtual}:}{Logical flag, set to \code{TRUE} if this isa virtual class.}\item{\code{prototype}:}{The object that represents the standardprototype for this class; i.e., the data and slots returned by acall to \code{\link{new}} for this class with no specialarguments. Don't mess with the prototype object directly.}\item{\code{validity}:}{Optionally, a function to be used to testthe validity of objects from this class.See \code{\link{validObject}}.}\item{\code{access}:}{Access control information. Not currently used.}\item{\code{className}:}{The character string name of the class.}\item{\code{package}:}{The character string name of the package towhich the class belongs. Nearly always the package on which themetadata for the class is stored, but in operations such asconstructing inheritance information, the internal package namerules.}\item{\code{subclasses}:}{A named list of the classes known toextend this class'; the elements of the list are objects of\code{\link{SClassExtension-class}}. The list is currently onlyfilled in when completing the class definition (see the details).}\item{\code{versionKey}:}{Object of class \code{"externalptr"};eventually will perhaps hold some versioning information, but notcurrently used. }\item{\code{sealed}:}{Object of class \code{"logical"}; is thisclass sealed? If so, no modifications are allowed. }}}\details{Class definitions are stored as metadata in various packages.Additional metadata supplies information on inheritance (the result ofcalls to \code{\link{setIs}}). Inheritance information implied by theclass definition itself (because the class contains one or more otherclasses) is also constructed automatically.When a class is to be used in an R session, this information isassembled to complete the class definition. The completion is asecond object of class \code{"classRepresentation"}, cached for thesession or until something happens to change the information. A callto \code{\link{getClass}} returns the completed definition of a class;a call to \code{\link{getClassDef}} returns the stored definition(uncompleted).In particular, completion fills in the upward- and downward-pointinginheritance information for the class, in slots \code{contains} and\code{subclasses} respectively. It's in principle important to notethat this information can depend on which packages are installed,since these may define additional subclasses or superclasses.}\seealso{See function \code{\link{setClass}} to supply the information in theclass definition.See \link{Classes} for a more basic discussion of class information.}\keyword{classes}