Add docs for createQ/initQ and createS/initS
[filehash.git] / man / queue-class.Rd
blob09f320473aaf7a1f2fc810f9f77598890a66fdcf
1 \name{queue-class}
2 \docType{class}
3 \alias{queue-class}
4 \alias{isEmpty,queue-method}
5 \alias{pop,queue-method}
6 \alias{push,queue-method}
7 \alias{show,queue-method}
8 \alias{top,queue-method}
10 \title{Class "queue"}
11 \description{A queue implementation using a \code{filehash} database}
12 \section{Objects from the Class}{
13 Objects can be created by calls of the form \code{new("queue", ...)} or
14 by calling \code{createQ}.  Existing queues can be initialized with
15 \code{initQ}.
17 \section{Slots}{
18          \describe{
19     \item{\code{queue}:}{Object of class \code{"filehashDB1"}}
20     \item{\code{name}:}{Object of class \code{"character"}: the name of
21       the queue (default is the file name in which the queue data are
22       stored)}
23   }
25 \section{Methods}{
26   \describe{
27     \item{isEmpty}{\code{signature(db = "queue")}: returns
28       \code{TRUE}/\code{FALSE} depending on whether there are elements
29       in the queue.}
30     \item{pop}{\code{signature(db = "queue")}: returns the value of the
31       "top" (i.e. head) of the queue and subsequently removes that
32       element from the queue; an error is signaled if the queue is empty}
33     \item{push}{\code{signature(db = "queue")}: adds an element to the
34       tail ("bottom") of the queue}
35     \item{show}{\code{signature(object = "queue")}: prints the name of
36       the queue}
37     \item{top}{\code{signature(db = "queue")}: returns the value of the
38       "top" (i.e. head) of the queue; an error is signaled if the queue
39       is empty}
40   }
42 \author{Roger D. Peng \email{rpeng@jhsph.edu}}
44 \examples{
45 showClass("queue")
47 \keyword{classes}