| 58 | |
| 59 | |
| 60 | RCPP_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 |
nothing calls this directly
no test coverage detected