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

Method customRSignature

src/attributes.cpp:399–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397 const std::vector<std::string>& roxygen() const { return roxygen_; }
398
399 std::string customRSignature() const {
400 Param sigParam = paramNamed(kExportSignature);
401 std::string sig = sigParam.value();
402 trimWhitespace(&sig);
403 if (sig.empty()) return sig;
404 if (sig.back() == '}')
405 sig = sig.substr(0, sig.size()-1);
406 // check sig.empty again since we deleted an element
407 if (sig.empty()) return sig;
408 if (sig.front() == '{')
409 sig.erase(0,1);
410 return sig;
411 }
412
413 private:
414 std::string name_;

Callers 2

doWriteFunctionsMethod · 0.80
generateRMethod · 0.80

Calls 4

trimWhitespaceFunction · 0.85
eraseMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected