File: isVersioned.Rd

package info (click to toggle)
r-bioc-biobase 2.66.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,136 kB
  • sloc: ansic: 642; makefile: 3
file content (52 lines) | stat: -rw-r--r-- 1,389 bytes parent folder | download | duplicates (6)
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
\name{isVersioned}
\alias{isVersioned}

\alias{isVersioned,ANY-method}
\alias{isVersioned,character-method}

\title{Determine whether object or class contains versioning information}
\description{

  This generic function checks to see whether \code{\link{Versioned-class}} information
  is present. When the argument to \code{isVersioned} is a character
  string, the prototype of the class corresponding to the string is
  consulted.

  By default, \code{isVersioned} has the following behaviors:
  \describe{
    \item{\code{isVersioned(Versioned-instance)}}{Returns \code{TRUE} when the instance have version information.}
    \item{\code{isCurrent("class-name")}}{Returns \code{TRUE} when the named class extends \code{\link{Versioned-class}}.}
    \item{\code{isVersioned(ANY)}}{Returns \code{FALSE}}
  }

}
\usage{
isVersioned(object)
}
\arguments{
  \item{object}{Object or class name to check for version information, as described above.}
}
\value{
  \code{isVersioned} returns a logical indicating whether version information is present.
}

\author{Biocore team}

\seealso{\code{\link{Versions-class}}}

\examples{

obj <- new("VersionedBiobase")
isVersioned(obj)

isVersioned(1:10) # FALSE

A <- setClass("A", contains="VersionedBiobase",
         prototype=prototype(new("VersionedBiobase", versions=c(A="1.0.0"))))
a <- A()
isVersioned(a)

removeClass("A")
}

\keyword{manip}