#include <report_error_flag.hh>
Inheritance diagram for lestes::msg::report_error_flag:

Public Member Functions | |
| virtual void | process (const ptr< message > &a_message, const ptr< source_location > &a_location) |
| Processes a report. | |
| bool | error_get (void) const |
| Returns error flag. | |
Static Public Member Functions | |
| static ptr< report_error_flag > | create (const ptr< report_filter > &a_output) |
| Factory method. | |
Protected Member Functions | |
| report_error_flag (const ptr< report_filter > &a_output) | |
| Creates a filter with output. | |
Private Member Functions | |
| report_error_flag (const report_error_flag &) | |
| Hides copy constructor. | |
| report_error_flag & | operator= (const report_error_flag &) |
| Hides assignment operator. | |
Private Attributes | |
| bool | error |
| Has an error already occured? | |
Represents abstract filter of reported messages with location. Each inherited filter is intended to either perform an optional transformation on a report and call process_output(), or filter it out by not calling process_output(). Individual filters' create methods should reserve first parameter to specifying output, followed by other specific parameters, to enable easy chaining of filters.
Definition at line 59 of file report_error_flag.hh.
| lestes::msg::report_error_flag::report_error_flag | ( | const ptr< report_filter > & | a_output | ) | [protected] |
Creates a filter with output.
Creates a filter, initializes with output.
| a_output | The output of the filter. |
Definition at line 55 of file report_error_flag.cc.
Referenced by create().
00055 : 00056 report_filter(a_output), 00057 error(false) 00058 { 00059 }
| lestes::msg::report_error_flag::report_error_flag | ( | const report_error_flag & | ) | [private] |
Hides copy constructor.
| void lestes::msg::report_error_flag::process | ( | const ptr< message > & | a_message, | |
| const ptr< source_location > & | a_location | |||
| ) | [virtual] |
Processes a report.
Processes a report by output.
a_location != NULL
output != NULL
| a_message | The message to pass to the output. | |
| a_location | The location to pass to the output. |
Implements lestes::msg::report_filter.
Definition at line 69 of file report_error_flag.cc.
References error, lestes::msg::message::FLG_ERROR, lassert, and lestes::msg::report_filter::process_output().
00071 { 00072 lassert(a_message); 00073 lassert(a_location); 00074 00075 if (a_message->flags_get() == message::FLG_ERROR) 00076 error = true; 00077 00078 process_output(a_message,a_location); 00079 }
| bool lestes::msg::report_error_flag::error_get | ( | void | ) | const |
Returns error flag.
Definition at line 83 of file report_error_flag.cc.
References error.
00084 { 00085 return error; 00086 }
| ptr< report_error_flag > lestes::msg::report_error_flag::create | ( | const ptr< report_filter > & | a_output | ) | [static] |
Factory method.
Definition at line 44 of file report_error_flag.cc.
References report_error_flag().
00045 { 00046 return new report_error_flag(a_output); 00047 }
| report_error_flag& lestes::msg::report_error_flag::operator= | ( | const report_error_flag & | ) | [private] |
Hides assignment operator.
bool lestes::msg::report_error_flag::error [private] |
Has an error already occured?
Definition at line 73 of file report_error_flag.hh.
Referenced by error_get(), and process().
1.5.1-20070107