new
. . RcppRedis:
RCPP_MODULE(Redis) {
Rcpp::class_<Redis>("Redis")
.constructor("default constructor")
[...stuff omitted for brevity...]
;
}
R (, demo/
)
suppressMessages(library(RcppRedis))
redis <- new(Redis)
redis$foo()
.., .
,
mcModule <- new(mcModule)
mcModule$Multicool
.
: , loadModule("mcModule", TRUE)
.
2: , () testRcppModule
, ( DESCRIPTION
), - R
edd@max:/tmp/rcpp/module$ diff -ru ~/git/rcpp/inst/unitTests/testRcppModule/ testRcppModule/
diff -ru /home/edd/git/rcpp/inst/unitTests/testRcppModule/DESCRIPTION testRcppModule/DESCRIPTION
--- /home/edd/git/rcpp/inst/unitTests/testRcppModule/DESCRIPTION 2015-08-26 15:53:03.891830292 -0500
+++ testRcppModule/DESCRIPTION 2015-10-22 21:34:23.716959638 -0500
@@ -10,6 +10,6 @@
LazyLoad: yes
Depends: methods, Rcpp (>= 0.8.5)
LinkingTo: Rcpp
-RcppModules: RcppModuleWorld, stdVector, NumEx
+RcppModules: RcppModuleWorld, stdVector, NumEx, mcModule
Packaged: 2010-09-09 18:42:28 UTC; jmc
diff -ru /home/edd/git/rcpp/inst/unitTests/testRcppModule/R/zzz.R testRcppModule/R/zzz.R
--- /home/edd/git/rcpp/inst/unitTests/testRcppModule/R/zzz.R 2015-08-26 15:53:03.891830292 -0500
+++ testRcppModule/R/zzz.R 2015-10-22 21:41:41.468532838 -0500
@@ -8,4 +8,5 @@
loadModule("RcppModuleNumEx", TRUE)
loadModule("RcppModuleWorld", TRUE)
loadModule("stdVector", TRUE)
+loadModule("mcModule", TRUE)
Only in testRcppModule/src: multicool.cpp
edd@max:/tmp/rcpp/module$
:
$ r --package testRcppModule --eval 'm <- new(mcModule); print(m)'
C++ object <0x757d18> of class 'mcModule' <0x1adeab0>
$