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

Function S4_CppOverloadedMethods

inst/include/Rcpp/Module.h:341–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339 typedef std::vector<signed_method_class*> vec_signed_method ;
340
341 S4_CppOverloadedMethods( vec_signed_method* m, const XP_Class& class_xp, const char* name, std::string& buffer ) : Reference( "C++OverloadedMethods" ){
342 int n = static_cast<int>(m->size()) ;
343 Rcpp::LogicalVector voidness(n), constness(n) ;
344 Rcpp::CharacterVector docstrings(n), signatures(n) ;
345 Rcpp::IntegerVector nargs(n) ;
346 signed_method_class* met ;
347 for( int i=0; i<n; i++){
348 met = m->at(i) ;
349 nargs[i] = met->nargs() ;
350 voidness[i] = met->is_void() ;
351 constness[i] = met->is_const() ;
352 docstrings[i] = met->docstring ;
353 met->signature(buffer, name) ;
354 signatures[i] = buffer ;
355 }
356
357 field( "pointer" ) = Rcpp::XPtr< vec_signed_method >( m, false ) ;
358 field( "class_pointer" ) = class_xp ;
359 field( "size" ) = n ;
360 field( "void" ) = voidness ;
361 field( "const" ) = constness ;
362 field( "docstrings" ) = docstrings ;
363 field( "signatures" ) = signatures ;
364 field( "nargs" ) = nargs ;
365
366 }
367
368 RCPP_CTOR_ASSIGN_WITH_BASE(S4_CppOverloadedMethods)
369

Callers

nothing calls this directly

Calls 6

sizeMethod · 0.45
atMethod · 0.45
nargsMethod · 0.45
is_voidMethod · 0.45
is_constMethod · 0.45
signatureMethod · 0.45

Tested by

no test coverage detected