\HeaderA{Versioned}{Class "Versioned"}{Versioned}
\aliasA{classVersion,Versioned-method}{Versioned}{classVersion,Versioned.Rdash.method}
\aliasA{classVersion<-,Versioned,Versions-method}{Versioned}{classVersion<.Rdash.,Versioned,Versions.Rdash.method}
\aliasA{initialize,Versioned-method}{Versioned}{initialize,Versioned.Rdash.method}
\aliasA{isCurrent,Versioned,character-method}{Versioned}{isCurrent,Versioned,character.Rdash.method}
\aliasA{isCurrent,Versioned,missing-method}{Versioned}{isCurrent,Versioned,missing.Rdash.method}
\aliasA{isVersioned,Versioned-method}{Versioned}{isVersioned,Versioned.Rdash.method}
\aliasA{show,Versioned-method}{Versioned}{show,Versioned.Rdash.method}
\aliasA{Versioned-class}{Versioned}{Versioned.Rdash.class}
\keyword{classes}{Versioned}
\begin{Description}\relax
Use this class as a `superclass' for classes requiring information
about versions.
\end{Description}
\begin{Section}{Methods}
The following are defined; package developers may write additional methods.
\describe{
\item[\code{new("Versioned", ..., versions=list())}] Create a new \code{Versioned-class} instance,
perhaps with additional named version elements (the contents of
\code{versions}) added. Named elements of \code{versions} are
character strings that can be coerced using \code{\LinkA{package\_version}{package.Rul.version}}, or \code{package\_version} instances.
\item[\code{classVersion(object)}] Obtain version information about instance \code{object}. See \code{\LinkA{classVersion}{classVersion}}.
\item[\code{classVersion(object) <- value}] Set version information on instance \code{object} to \code{value}; useful when \code{object} is an instance of a class that contains \code{VersionClass}. See \code{\LinkA{classVersion}{classVersion}}.
\item[\code{classVersion(object)["id"] <- value}] Create or update version information \code{"id"} on instance \code{object} to \code{value}; useful when \code{object} is an instance of a class that contains \code{VersionClass}. See \code{\LinkA{classVersion}{classVersion}}.
\item[\code{show(object)}] Default method returns \code{invisible},
to avoid printing confusing information when your own class does
not have a \code{show} method defined. Use
\code{classVersion(object)} to get or set version information.
}
\end{Section}
\begin{Author}\relax
Biocore
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{Versions-class}{Versions.Rdash.class}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

obj <- new("Versioned", versions=list(A="1.0.0"))
obj
classVersion(obj)

setClass("A", contains="Versioned")

classVersion("A")
a <- new("A")
a # 'show' nothing by default
classVersion(a)

setClass("B",
         contains="Versioned",
         prototype=prototype(new("Versioned",versions=list(B="1.0.0"))))

classVersion("B")
b <- new("B")
classVersion(b)

classVersion(b)["B"] <- "1.0.1"
classVersion(b)
classVersion("B")

classVersion("B") < classVersion(b)
classVersion(b) == "1.0.1"

setClass("C",
         representation(x="numeric"),
         contains=("VersionedBiobase"),
         prototype=prototype(new("VersionedBiobase", versions=c(C="1.0.1"))))

setMethod("show", signature(object="C"),
          function(object) print(object@x))

c <- new("C", x=1:10)

c

classVersion(c)

\end{ExampleCode}
\end{Examples}

