|
Rumba C++ SDK
|
#include <RedirectStd.h>
Public Types | |
| enum | FileDescriptor { FileDescriptor::out, FileDescriptor::err } |
Public Member Functions | |
| RedirectStd (FileDescriptor fd) | |
| Once the object created, the stream is redirected. More... | |
| virtual | ~RedirectStd () |
| FileDescriptor | file_descriptor () const |
| void | restore () |
| Must be called in the derived object's destructor. More... | |
| virtual void | on_data (const gsl::span< char > &buffer)=0 |
| The callback when data have been read on the stream. UTF-8 character are integral. More... | |
Redirect stdout or stderr to intercept the stream but continue to send it to the original output. The data stream is supposed to be UTF-8 text
|
strong |
| maquina::RedirectStd::RedirectStd | ( | FileDescriptor | fd | ) |
Once the object created, the stream is redirected.
| fd | The file to redirect |
|
inlinevirtual |
|
inline |
|
pure virtual |
The callback when data have been read on the stream. UTF-8 character are integral.
The callback is called in a dedicated thread
| void maquina::RedirectStd::restore | ( | ) |
Must be called in the derived object's destructor.