#include <OutputCapturer.h>
Public Member Functions | |
OutputCapturer () | |
void | begin_capture () |
void | end_capture () |
std::string | get_stdout () const |
std::string | get_stderr () const |
void | log (std::string prefix, rlog::RLogChannel *channel) |
Protected Member Functions | |
std::string | get_temp_file_name () |
Private Attributes | |
const char * | start_sig |
const char * | end_sig |
FILE * | stream_redir_ |
char | capture_file_name_ [10] |
int | fd_save_ |
std::ostringstream | stdout_buf_ |
Definition at line 30 of file OutputCapturer.h.
OutputCapturer::OutputCapturer | ( | ) | [inline] |
Definition at line 32 of file OutputCapturer.h.
void OutputCapturer::begin_capture | ( | ) | [inline] |
Definition at line 40 of file OutputCapturer.h.
References capture_file_name_, fd_save_, start_sig, and stream_redir_.
Referenced by LinearEigsolvOperators::buildPreconditioner(), QuadraticEigsolvOperators::getHPrec(), LinearEigsolvOperators::getHPrec(), HierarchicalBasisPrec::HierarchicalBasisPrec(), FemaxxDriver::~FemaxxDriver(), LinearEigsolvOperators::~LinearEigsolvOperators(), and QuadraticEigsolvOperators::~QuadraticEigsolvOperators().
void OutputCapturer::end_capture | ( | ) | [inline] |
Definition at line 62 of file OutputCapturer.h.
References capture_file_name_, end_sig, fd_save_, start_sig, stdout_buf_, and stream_redir_.
Referenced by LinearEigsolvOperators::buildPreconditioner(), QuadraticEigsolvOperators::getHPrec(), LinearEigsolvOperators::getHPrec(), HierarchicalBasisPrec::HierarchicalBasisPrec(), FemaxxDriver::~FemaxxDriver(), LinearEigsolvOperators::~LinearEigsolvOperators(), and QuadraticEigsolvOperators::~QuadraticEigsolvOperators().
std::string OutputCapturer::get_stderr | ( | ) | const [inline] |
Definition at line 107 of file OutputCapturer.h.
std::string OutputCapturer::get_stdout | ( | ) | const [inline] |
Definition at line 96 of file OutputCapturer.h.
References end_sig, fd_save_, start_sig, and stdout_buf_.
Referenced by LinearEigsolvOperators::buildPreconditioner(), log(), LinearEigsolvOperators::~LinearEigsolvOperators(), and QuadraticEigsolvOperators::~QuadraticEigsolvOperators().
std::string OutputCapturer::get_temp_file_name | ( | ) | [inline, protected] |
Definition at line 118 of file OutputCapturer.h.
void OutputCapturer::log | ( | std::string | prefix, | |
rlog::RLogChannel * | channel | |||
) | [inline] |
Definition at line 112 of file OutputCapturer.h.
References get_stdout().
Referenced by QuadraticEigsolvOperators::getHPrec(), LinearEigsolvOperators::getHPrec(), HierarchicalBasisPrec::HierarchicalBasisPrec(), and FemaxxDriver::~FemaxxDriver().
Here is the call graph for this function:
char OutputCapturer::capture_file_name_[10] [private] |
const char* OutputCapturer::end_sig [private] |
int OutputCapturer::fd_save_ [private] |
File descriptor pointing to the original stdout.
Definition at line 128 of file OutputCapturer.h.
Referenced by begin_capture(), end_capture(), and get_stdout().
const char* OutputCapturer::start_sig [private] |
Definition at line 123 of file OutputCapturer.h.
Referenced by begin_capture(), end_capture(), and get_stdout().
std::ostringstream OutputCapturer::stdout_buf_ [private] |
String stream holding the captured output.
Definition at line 130 of file OutputCapturer.h.
Referenced by end_capture(), and get_stdout().
FILE* OutputCapturer::stream_redir_ [private] |