1
- // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2
1
//
3
2
// Module.h: Rcpp R/C++ interface class library -- Rcpp modules
4
3
//
5
- // Copyright (C) 2012 - 2013 Dirk Eddelbuettel and Romain Francois
4
+ // Copyright (C) 2012 - 2019 Dirk Eddelbuettel and Romain Francois
6
5
//
7
6
// This file is part of Rcpp.
8
7
//
@@ -51,7 +50,7 @@ namespace Rcpp {
51
50
* @param args an array of R objects to use as arguments for the function
52
51
* @param nargs number of arguments
53
52
*/
54
- inline SEXP invoke ( const std::string& name_, SEXP* args, int nargs){
53
+ inline SEXP invoke ( const std::string& name_, SEXP* args, int nargs){ // #nocov start
55
54
MAP::iterator it = functions.find ( name_ );
56
55
if ( it == functions.end () ){
57
56
throw std::range_error ( " no such function" ) ;
@@ -81,7 +80,7 @@ namespace Rcpp {
81
80
}
82
81
x.names () = names ;
83
82
return x ;
84
- }
83
+ } // #nocov end
85
84
86
85
/* *
87
86
* vector of names of the functions
@@ -117,7 +116,7 @@ namespace Rcpp {
117
116
/* *
118
117
* completion information
119
118
*/
120
- CharacterVector complete (){
119
+ CharacterVector complete (){ // #nocov start
121
120
size_t nf = functions.size () ;
122
121
size_t nc = classes.size () ;
123
122
size_t n = nf + nc ;
@@ -139,7 +138,7 @@ namespace Rcpp {
139
138
res[i] = cit->first ;
140
139
}
141
140
return res ;
142
- }
141
+ } // #nocov end
143
142
144
143
/* *
145
144
* Returns a list that contains:
@@ -199,13 +198,13 @@ namespace Rcpp {
199
198
classes.insert ( CLASS_PAIR ( name_ , cptr ) ) ;
200
199
}
201
200
202
- inline bool has_function ( const std::string& m){
201
+ inline bool has_function ( const std::string& m){ // #nocov start
203
202
return functions.find (m) != functions.end () ;
204
203
}
205
204
206
205
inline bool has_class ( const std::string& m){
207
206
return classes.find (m) != classes.end () ;
208
- }
207
+ } // #nocov end
209
208
210
209
CppClass get_class ( const std::string& cl ) ;
211
210
0 commit comments