35#include <wx/textctrl.h>
36#include <wx/statusbr.h>
61 wxT(
"No wxTextCtrl object defined in WX_TEXT_CTRL_REPORTER." ) );
110 static REPORTER* s_nullReporter =
nullptr;
112 if( !s_nullReporter )
115 return *s_nullReporter;
123 FILE* target = stdout;
128 if( aMsg.EndsWith( wxS(
"\n" ) ) )
129 wxFprintf( target, aMsg );
131 wxFprintf( target, aMsg + wxS(
"\n" ) );
141 return s_cliReporter;
161 std::cout << aMsg << std::endl;
169 static REPORTER* s_stdoutReporter =
nullptr;
171 if( !s_stdoutReporter )
174 return *s_stdoutReporter;
200 static REPORTER* s_wxLogReporter =
nullptr;
203 if( !s_wxLogReporter )
206 return *s_wxLogReporter;
Reporter forwarding messages to stdout or stderr as appropriate.
REPORTER & Report(const wxString &aMsg, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
static REPORTER & GetInstance()
static REPORTER & GetInstance()
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
wxStatusBar * m_statusBar
bool HasMessage() const override
Returns true if the reporter client is non-empty.
REPORTER & Report(const wxString &aMsg, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
static REPORTER & GetInstance()
REPORTER & Report(const wxString &aMsg, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
static REPORTER & GetInstance()
bool HasMessage() const override
Returns true if the reporter client is non-empty.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
const wxString & GetMessages() const
bool HasMessage() const override
Returns true if the reporter client is non-empty.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
static const wxChar traceReporter[]
Flag to enable reporter debugging output.
This file contains miscellaneous commonly used macros and functions.
static std::mutex g_logReporterMutex
wxString From_UTF8(const char *cstring)