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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topic.R
\name{RoxyTopic}
\alias{RoxyTopic}
\title{A \code{RoxyTopic} is an ordered collection of unique rd_sections}
\description{
A \code{RoxyTopic} object corresponds to a generated \code{.Rd} file.
}
\keyword{internal}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{sections}}{Named list of sections. Each item must be an
\code{\link[=rd_section]{rd_section()}} object.}
\item{\code{filename}}{Path to the \code{.Rd} file to generate.}
}
\if{html}{\out{</div>}}
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-RoxyTopic-format}{\code{RoxyTopic$format()}}
\item \href{#method-RoxyTopic-is_valid}{\code{RoxyTopic$is_valid()}}
\item \href{#method-RoxyTopic-has_section}{\code{RoxyTopic$has_section()}}
\item \href{#method-RoxyTopic-get_section}{\code{RoxyTopic$get_section()}}
\item \href{#method-RoxyTopic-get_value}{\code{RoxyTopic$get_value()}}
\item \href{#method-RoxyTopic-get_rd}{\code{RoxyTopic$get_rd()}}
\item \href{#method-RoxyTopic-get_name}{\code{RoxyTopic$get_name()}}
\item \href{#method-RoxyTopic-inherits_from}{\code{RoxyTopic$inherits_from()}}
\item \href{#method-RoxyTopic-inherits_section_from}{\code{RoxyTopic$inherits_section_from()}}
\item \href{#method-RoxyTopic-add}{\code{RoxyTopic$add()}}
\item \href{#method-RoxyTopic-add_section}{\code{RoxyTopic$add_section()}}
\item \href{#method-RoxyTopic-clone}{\code{RoxyTopic$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-format"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-format}{}}}
\subsection{Method \code{format()}}{
Format the \code{.Rd} file. It considers the sections in
particular order, even though Rd tools will reorder them again.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$format(...)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{...}}{Passed to the \code{format()} methods of the \code{\link[=rd_section]{rd_section()}}
objects, the sections.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
Character string.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-is_valid"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-is_valid}{}}}
\subsection{Method \code{is_valid()}}{
Check if an \code{.Rd} file is valid
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$is_valid()}\if{html}{\out{</div>}}
}
\subsection{Returns}{
Logical flag, \code{TRUE} for valid \code{.Rd} files
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-has_section"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-has_section}{}}}
\subsection{Method \code{has_section()}}{
Check if an \code{.Rd} file has a certain section.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$has_section(type)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{type}}{Section type, a character scalar.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
Logical flag.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-get_section"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-get_section}{}}}
\subsection{Method \code{get_section()}}{
Query a section.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$get_section(type)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{type}}{Section type, a character scalar.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The \link{rd_section} object representing the section, or \code{NULL}
if the topic has no such section.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-get_value"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-get_value}{}}}
\subsection{Method \code{get_value()}}{
Query the value of a section. This is the value of
the \link{rd_section} object.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$get_value(type)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{type}}{Section type, a character scalar.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
Value.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-get_rd"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-get_rd}{}}}
\subsection{Method \code{get_rd()}}{
Get the Rd code of a section.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$get_rd(type)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{type}}{Section type, a character scalar.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
Character vector, one element per line.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-get_name"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-get_name}{}}}
\subsection{Method \code{get_name()}}{
Get the value of the \code{name} section. This is the name
of the Rd topic.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$get_name()}\if{html}{\out{</div>}}
}
\subsection{Returns}{
Character scalar.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-inherits_from"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-inherits_from}{}}}
\subsection{Method \code{inherits_from()}}{
Query the topics this topic inherits \code{type} from.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$inherits_from(type)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{type}}{Section type, a character scalar.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
A character vector of topic names.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-inherits_section_from"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-inherits_section_from}{}}}
\subsection{Method \code{inherits_section_from()}}{
Query the topics this topic inherits sections from.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$inherits_section_from()}\if{html}{\out{</div>}}
}
\subsection{Returns}{
A character vector of topic names.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-add"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-add}{}}}
\subsection{Method \code{add()}}{
Add one or more sections to the topic.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$add(x, block = "???", overwrite = FALSE)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{x}}{Section(s) to add. It may be
another \code{RoxyTopic} object, all of its sections will be added;
or an \link{rd_section} object;
or a list of \link{rd_section} objects to add.}
\item{\code{block}}{Name of block to use in error messages.}
\item{\code{overwrite}}{Whether to overwrite an existing section. If \code{FALSE}
then the two sections will be merged.}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-add_section"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-add_section}{}}}
\subsection{Method \code{add_section()}}{
Add a section.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$add_section(section, block = "???", overwrite = FALSE)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{section}}{\link{rd_section} object to add.}
\item{\code{block}}{Name of block to use in error messages.}
\item{\code{overwrite}}{Whether to overwrite an existing section. If \code{FALSE}
then the two sections will be merged.}
}
\if{html}{\out{</div>}}
}
\subsection{Details}{
Ensures that each type of name (as given by its name), only appears
once in \code{self$sections}. This method if for internal use only.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-RoxyTopic-clone"></a>}}
\if{latex}{\out{\hypertarget{method-RoxyTopic-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RoxyTopic$clone(deep = FALSE)}\if{html}{\out{</div>}}
}
\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}
|