Skip to content

Commit b265934

Browse files
authored
Add \usage section to four attributes manual pages (#1487)
1 parent 30e1822 commit b265934

5 files changed

Lines changed: 34 additions & 5 deletions

File tree

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2026-07-24 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* man/dependsAttribute.Rd: Add \usage{} section to appease R-devel
4+
* man/exportAttribute.Rd: Idem
5+
* man/interfacesAttribute.Rd: Idem
6+
* man/pluginsAttribute.Rd: Idem
7+
18
2026-07-13 Dirk Eddelbuettel <edd@debian.org>
29

310
* README.md: Revert back to mentioning rcpp-devel as R-forge is back,

man/dependsAttribute.Rd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44
\title{Rcpp::depends Attribute}
55

66
\description{
7-
The \code{Rcpp::depends} attribute is added to a C++ source file to indicate that it has a compilation dependency on one or more other packages. For example:
7+
The \code{Rcpp::depends} attribute is added to a C++ source file to indicate
8+
that it has a compilation dependency on one or more other packages. For example:
89
\preformatted{
910
// [[Rcpp::depends(RcppArmadillo)]]
1011
}
1112
}
1213

14+
\usage{
15+
# In C++ code:
16+
# // [[Rcpp::depends(...)]]
17+
}
18+
1319
\arguments{
1420
\item{\dots}{
1521
Packages which the source file depends on for compilation

man/exportAttribute.Rd

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@
77
The \code{Rcpp::export} attribute is added to a C++ function definition to indicate that it should be made available as an R function. The \code{\link{sourceCpp}} and \code{\link{compileAttributes}} functions process the \code{Rcpp::export} attribute by generating the code required to call the C++ function from R.
88
}
99

10+
\usage{
11+
# In C++ code:
12+
# // [[Rcpp::export]]
13+
# or
14+
# // [[Rcpp::export(name)]]
15+
}
16+
1017
\arguments{
1118
\item{name}{
12-
Specify an alternate name for the generated R function (optional, defaults to the name of the C++ function if not specified).
19+
Specify an alternate (quoted) name for the generated R function (optional, defaults to the name of the C++ function if not specified).
1320
}
1421
}
1522

man/interfacesAttribute.Rd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ The \code{Rcpp::interfaces} attribute is added to a C++ source file to specify w
1010
}
1111
}
1212

13+
\usage{
14+
# In C++ code:
15+
# // [[Rcpp::interfaces(...)]]
16+
}
17+
1318
\arguments{
1419
\item{\dots}{
1520
Interfaces to generate for exported functions within the source file. Valid values are \code{r} and \code{cpp}, and more than one interface can be specified.

man/pluginsAttribute.Rd

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ The \code{Rcpp::plugins} attribute is added to a C++ source file to specify the
1111
}
1212
}
1313

14+
\usage{
15+
# In C++ code:
16+
# // [[Rcpp::plugins(...)]]
17+
}
18+
1419
\arguments{
1520
\item{\dots}{
1621
Plugins to add to the compilation.
@@ -19,10 +24,10 @@ The \code{Rcpp::plugins} attribute is added to a C++ source file to specify the
1924

2025
\details{
2126
Plugins must be registered using the \code{\link{registerPlugin}}
22-
function.
27+
function.
2328

2429
When included within a \code{\link{sourceCpp}} translation unit,
25-
the configuration-related fields of the plugin (e.g. \code{env} and
30+
the configuration-related fields of the plugin (e.g. \code{env} and
2631
\code{LinkingTo}) are utilized, however the code-generation fields
2732
(e.g. \code{includes} and \code{body}) are not.
2833

@@ -48,4 +53,3 @@ int useCpp11() {
4853
}
4954
}
5055
}
51-

0 commit comments

Comments
 (0)