23 #ifndef RCPP__IOSTREAM__RSTREAMBUF_H
24 #define RCPP__IOSTREAM__RSTREAMBUF_H
31 template <
bool OUTPUT>
37 virtual std::streamsize
xsputn(
const char *s, std::streamsize n);
39 virtual int overflow(
int c = traits_type::eof());
44 template <
bool OUTPUT>
53 Rprintf(
"%.*s", num, s);
57 REprintf(
"%.*s", num, s);
62 if (c != traits_type::eof()) {
63 char_type ch = traits_type::to_char_type(c);
64 return xsputn(&ch, 1) == 1 ? c : traits_type::eof();
69 if (c != traits_type::eof()) {
70 char_type ch = traits_type::to_char_type(c);
71 return xsputn(&ch, 1) == 1 ? c : traits_type::eof();
85 #ifdef RCPP_USE_GLOBAL_ROSTREAM
Rstreambuf< OUTPUT > Buffer
virtual int overflow(int c=traits_type::eof())
virtual std::streamsize xsputn(const char *s, std::streamsize n)
static Rostream< false > Rcerr
static Rostream< true > Rcout