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

Method methods_arity

inst/include/Rcpp/module/class.h:337–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335 }
336
337 Rcpp::IntegerVector methods_arity(){
338 size_t n = 0 ;
339 size_t s = vec_methods.size() ;
340 typename map_vec_signed_method::iterator it = vec_methods.begin( ) ;
341 for( size_t i=0; i<s; i++, ++it){
342 n += (it->second)->size() ;
343 }
344 Rcpp::CharacterVector mnames(n) ;
345 Rcpp::IntegerVector res(n) ;
346 it = vec_methods.begin() ;
347 size_t k = 0 ;
348 for( size_t i=0; i<s; i++, ++it){
349 n = (it->second)->size() ;
350 std::string name = it->first ;
351 typename vec_signed_method::iterator m_it = (it->second)->begin() ;
352 for( size_t j=0; j<n; j++, k++, ++m_it){
353 mnames[k] = name ;
354 res[k] = (*m_it)->nargs() ;
355 }
356 }
357 res.names( ) = mnames ;
358 return res ;
359 }
360
361 Rcpp::LogicalVector methods_voidness(){
362 size_t n = 0 ;

Callers 1

RCPP_FUN_1Function · 0.45

Calls 4

namesMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
nargsMethod · 0.45

Tested by

no test coverage detected