1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
\name{Versions}
\docType{class}
\alias{Versions-class}
\alias{Versions}
\alias{initialize,Versions-method}
\alias{[,Versions-method}
\alias{[<-,Versions-method}
\alias{[[<-,Versions-method}
\alias{$<-,Versions-method}
\alias{Compare,Versions,Versions-method}
\alias{Compare,Versions,character-method}
\alias{Compare,character,Versions-method}
\alias{updateObject,Versions-method}
\alias{show,Versions-method}
\alias{coerce,Versions,character-method}
\title{Class "Versions"}
\description{
A class to record version number information. This class is used to
report versions; to add version information to your own class, use
\code{\link{Versioned-class}}.
}
\section{Methods}{
The following are defined; package developers may write additional methods.
\describe{
\item{\code{new("Versions", ...)}}{Create a new \code{Versions-class} instance,
perhaps with named version elements (the contents of
\code{...}) added. Named elements of \code{versions} are
character strings that can be coerced using
\code{\link{package_version}}, or \code{package_version}
instances, \code{Versions-class} objects.}
\item{\code{object["id"]}}{Obtain version information \code{"id"} from \code{object}.}
\item{\code{object["id"] <- value}}{Create or update version information \code{"id"} on instance \code{object}.}
\item{\code{object[["id"]]}}{Obtain version information \code{"id"} from \code{object}. The result is a list of integers, corresponding to entries in the version string.}
\item{\code{object[["id"]] <- value}}{Create or update version information \code{"id"} on instance \code{object}.}
\item{\code{object$id}}{Obtain version information \code{"id"} from \code{object}.The result is a list of integers, corresponding to entries in the version string.}
\item{\code{object$id <- value}}{Create or update version
information \code{"id"} on instance \code{object}.}
\item{\code{show(object)}}{Display version information.}
\item{\code{updateObject(object)}}{Update \code{object} to the
current \code{Versions-class} representation. Note that this does \emph{not}
update another class that uses \code{Versions-class} to track the
class version.}
\item{\code{as(object, "character")}}{Convert \code{object} to character representation, e.g., \code{1.0.0}}
\item{\code{object1 < object2}}{Compare \code{object1} and \code{object2} using version class information. Symbols in addition to \code{<} are admissible; see \code{?Ops}}
}
}
\author{Biocore}
\seealso{
\code{\link{classVersion}}
\code{\link{isCurrent}}
\code{\link{isVersioned}}
}
\examples{
obj <- new("Versions", A="1.0.0")
obj
obj["A"] <- "1.0.1"
obj
obj["B"] <- "2.0"
obj
obj1 <- obj
obj1["B"] <- "2.0.1"
obj1 == obj
obj1["B"] > "2.0.0"
obj["B"] == "2.0" # TRUE!
}
\keyword{classes}
|