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

Method signature

src/attributes.cpp:1034–1049  ·  view source on GitHub ↗

Generate a type signature for the function with the provided name (type signature == function pointer declaration)

Source from the content-addressed store, hash-verified

1032 // Generate a type signature for the function with the provided name
1033 // (type signature == function pointer declaration)
1034 std::string Function::signature(const std::string& name) const { // #nocov start
1035
1036 std::ostringstream ostr;
1037
1038 ostr << type() << "(*" << name << ")(";
1039
1040 const std::vector<Argument>& args = arguments();
1041 for (std::size_t i = 0; i<args.size(); i++) {
1042 ostr << args[i].type();
1043 if (i != (args.size()-1))
1044 ostr << ",";
1045 }
1046 ostr << ")";
1047
1048 return ostr.str(); // #nocov end
1049 }
1050
1051
1052 // Parse attribute parameter from parameter text

Callers 2

writeEndMethod · 0.45
doWriteFunctionsMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected