1- \name {classModule }
2- \alias {classModule }
1+ \name {exposeClass }
2+ \alias {exposeClass }
33\title {
44Create an Rcpp Module to Expose a C ++ Class in R
55}
66\description {
77The arguments specify a C ++ class and some combination of
88constructors , fields and methods to be shared with \R by creating a
99corresponding reference class in \R.
10- The information needed in the call to \code {classModule ()} is the
10+ The information needed in the call to \code {exposeClass ()} is the
1111simplest possible in order to create a C ++ module for the class ; for
1212example , fields and methods in this class need only be identified by
1313their name.
2020}
2121
2222\usage {
23- classModule (class , constructors = , fields = , methods = , file = ,
23+ exposeClass (class , constructors = , fields = , methods = , file = ,
2424 header = , module = , CppClass = class , readOnly = , rename = ,
2525 Rfile = TRUE )
2626}
@@ -97,16 +97,16 @@ information in the C++ class supplied. This file is intended to be
9797part of the C ++ source for an \R package. The file only needs to
9898modified when the information changes , either because the class has
9999changed or because you want to expose different information to \R. In
100- that case you can either recall \code {classModule ()} or edit the C ++
100+ that case you can either recall \code {exposeClass ()} or edit the C ++
101101file created.
102102
103103The Rcpp Module mechanism has a number of other optional techniques ,
104- not covered by \code {classModule ()}. These should be entered into the
104+ not covered by \code {exposeClass ()}. These should be entered into the
105105C ++ file created. See the \dQuote {rcpp - modules } vignette with the
106106package for current possibilities.
107107
108108For fields and methods specified directly in the C ++ class ,
109- the fields and method arguments to \code {classModule ()} are character vectors naming the
109+ the fields and method arguments to \code {exposeClass ()} are character vectors naming the
110110corresponding members of the class. For module construction , the
111111data types of directly specified fields and of the arguments for the methods are not
112112needed.
@@ -128,7 +128,7 @@ An indirect mechanism is used, generating free functions in C++ to
128128expose the inherited members in \R.
129129
130130This mechanism requires data type information in the call to
131- \code {classModule ()}.
131+ \code {exposeClass ()}.
132132This is provided by naming the corresponding element of the
133133\code {fields } or \code {methods } argument with the name of the member.
134134The actual element of the \code {fields } argument is then the single
@@ -158,7 +158,7 @@ in the package.
158158\examples {
159159\dontrun {
160160# ## Given the following C++ class, defined in file PopBD.h,
161- # ## the call to classModule () shown below will write a file
161+ # ## the call to exposeClass () shown below will write a file
162162# ## src/PopBDModule.cpp containing a corresponding module definition.
163163# ## class PopBD {
164164# ## public:
@@ -178,7 +178,7 @@ in the package.
178178# ## The call below exposes the lineage and size fields, read-only,
179179# ## and the evolve() method.
180180
181- classModule (" PopBD" ,
181+ exposeClass (" PopBD" ,
182182 constructors =
183183 list (" " , c(" NumericVector" , " NumericVector" )),
184184 fields = c(" lineage" , " size" ),
@@ -191,7 +191,7 @@ classModule("PopBD",
191191# ## constructors as the previous class.
192192# ## To expose the table() method, and the inherited evolve() method and size field:
193193
194- classModule (" PopCount" ,
194+ exposeClass (" PopCount" ,
195195 constructors =
196196 list (" " , c(" NumericVector" , " NumericVector" )),
197197 fields = c(size = " std::vector<long>" ),
0 commit comments