Hi, this is somehow a general C++ question, but it could be of interest to all Rcpp users (I think).
Still for the purpose of RcppOctave, I would like to redirect cout and cerr streams that are used by Octave to Rprintf REprintf respectively. Currently I redirect these streams to 2 temporary stringstreams (via the std::cout.rdbuf get/set methods ) which buffer the output/errors messages and print them at the end of the Octave call. The standard streams are restored on exiting the function (in a class destructor). However, I would like to do this without buffering, i.e. that messages are printed as they come through the stream. This should be possible through the definition of a std::stream child class with some method overload that output the formatted messages as they are pushed into the stream. Anybody knows which class and method(s) need to be overloaded, or have hints on how to achieve this in an -- aesthetic -- way? Thank you. Bests, Renaud
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel