34#include <wx/textctrl.h>
35#include <wx/statusbr.h>
55 wxFAIL_MSG(
"HasMessageOfSeverity is not implemented in this reporter" );
63 wxT(
"No wxTextCtrl object defined in WX_TEXT_CTRL_REPORTER." ) );
117 static REPORTER* s_nullReporter =
nullptr;
119 if( !s_nullReporter )
122 return *s_nullReporter;
128 FILE* target = stdout;
133 if( aMsg.EndsWith( wxS(
"\n" ) ) )
134 wxFprintf( target, aMsg );
136 wxFprintf( target, aMsg + wxS(
"\n" ) );
146 return s_cliReporter;
164 std::cout << aMsg << std::endl;
172 static REPORTER* s_stdoutReporter =
nullptr;
174 if( !s_stdoutReporter )
177 return *s_stdoutReporter;
201 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 bool HasMessageOfSeverity(int aSeverityMask) const
Returns true if the reporter has one or more messages matching the specified severity mask.
virtual bool HasMessage() const =0
Returns true if the reporter client is non-empty.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
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.
bool HasMessageOfSeverity(int aSeverityMask) const override
Returns true if the reporter has one or more messages matching the specified severity mask.
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.
wxString From_UTF8(const char *cstring)