MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / RCPP_MODULE

Function RCPP_MODULE

inst/skeleton/rcpp_module.cpp:60–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58
59
60RCPP_MODULE(yada){
61 using namespace Rcpp ;
62
63 function("hello" , &hello , "documentation for hello ");
64 function("bla" , &bla , "documentation for bla ");
65 function("bla1" , &bla1 , "documentation for bla1 ");
66 function("bla2" , &bla2 , "documentation for bla2 ");
67
68 // with formal arguments specification
69 function("bar" , &bar ,
70 List::create( _["x"] = 0.0),
71 "documentation for bar ");
72 function("foo" , &foo ,
73 List::create( _["x"] = 1, _["y"] = 1.0),
74 "documentation for foo ");
75
76 class_<World>("World")
77 // expose the default constructor
78 .constructor()
79
80 .method("greet", &World::greet , "get the message")
81 .method("set", &World::set , "set the message")
82 ;
83}
84
85

Callers

nothing calls this directly

Calls 1

functionFunction · 0.85

Tested by

no test coverage detected