\HeaderA{promptClass}{Generate a Shell for Documentation of a Formal Class}{promptClass}
\keyword{programming}{promptClass}
\keyword{classes}{promptClass}
\begin{Description}\relax
Assembles all relevant slot and method information for a class, with
minimal markup for Rd processing; no QC facilities at present.
\end{Description}
\begin{Usage}
\begin{verbatim}
promptClass(clName, filename = NULL, type = "class",
            keywords = "classes", where = topenv(parent.frame()))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{clName}] a character string naming the class to be documented.
\item[\code{filename}] usually, a connection or a character string giving the
name of the file to which the documentation shell should be written.
The default corresponds to a file whose name is the topic name for
the class documentation, followed by \code{".Rd"}.  Can also be
\code{NA} (see below).
\item[\code{type}] the documentation type to be declared in the output file.
\item[\code{keywords}] the keywords to include in the shell of the
documentation.  The keyword \code{"classes"} should be one of
them.
\item[\code{where}] where to look for the definition of the class and of
methods that use it.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The class definition is found on the search list.  Using that
definition, information about classes extended and slots is
determined.

In addition, the currently available generics with methods for this
class are found (using \code{\LinkA{getGenerics}{getGenerics}}).  Note that these
methods need not be in the same environment as the class definition; in
particular, this part of the output may depend on which packages are
currently in the search list.

As with other prompt-style functions, unless \code{filename} is
\code{NA}, the documentation shell is written to a file, and a message
about this is given.  The file will need editing to give information
about the \emph{meaning} of the class.  The output of
\code{promptClass} can only contain information from the metadata
about the formal definition and how it is used.

If \code{filename} is \code{NA}, a list-style representation of the
documentation shell is created and returned.  Writing the shell to a
file amounts to \code{cat(unlist(x), file = filename, sep = "\bsl{}n")},
where \code{x} is the list-style representation.
\end{Details}
\begin{Value}
If \code{filename} is \code{NA}, a list-style representation of the
documentation shell.  Otherwise, the name of the file written to is
returned invisibly.
\end{Value}
\begin{Author}\relax
VJ Carey \email{stvjc@channing.harvard.edu} and John Chambers
\end{Author}
\begin{References}\relax
Chambers, John M. (2008)
\emph{Software for Data Analysis: Programming with R}
Springer.  (For the R version.)

Chambers, John M. (1998)
\emph{Programming with Data}
Springer (For the original S4 version.)
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{prompt}{prompt}} for documentation of functions,
\code{\LinkA{promptMethods}{promptMethods}} for documentation of method definitions.

For processing of the edited documentation, either use \code{R CMD
    \LinkA{Rdconv}{Rdconv}}, or include the edited file in the \file{man}
subdirectory of a package.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

## Not run: 
> promptClass("track")
A shell of class documentation has been written to the
file "track-class.Rd".
## End(Not run)
\end{ExampleCode}
\end{Examples}

