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

Function initializeGlobals

src/attributes.cpp:2829–2836  ·  view source on GitHub ↗

Generate the C++ code required to initialize global objects

Source from the content-addressed store, hash-verified

2827
2828 // Generate the C++ code required to initialize global objects
2829 void initializeGlobals(std::ostream& ostr) {
2830 ostr << "#ifdef RCPP_USE_GLOBAL_ROSTREAM" << std::endl;
2831 ostr << "Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();";
2832 ostr << std::endl;
2833 ostr << "Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();";
2834 ostr << std::endl;
2835 ostr << "#endif" << std::endl << std::endl;
2836 }
2837
2838 // Generate the C++ code required to make [[Rcpp::export]] functions
2839 // available as C symbols with SEXP parameters and return

Callers 2

commitMethod · 0.85
regenerateSourceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected