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

Public Member Functions | |
| virtual void | process (const ptr< message > &a_message, const ptr< source_location > &a_location) |
| Caches a report. | |
| ptr< message > | message_get (void) const |
| Returns cached message. | |
| ptr< source_location > | location_get (void) const |
| Returns cached location. | |
Static Public Member Functions | |
| static ptr< report_cache > | create (const ptr< report_filter > &a_output) |
| Returns new instance. | |
Protected Member Functions | |
| report_cache (const ptr< report_filter > &a_output) | |
| Creates the object. | |
Private Member Functions | |
| report_cache (const report_cache &) | |
| Hides copy constructor. | |
| report_cache & | operator= (const report_cache &) |
| Hides assignment operator. | |
Private Attributes | |
| srp< message > | cached_message |
| Last cached message. | |
| srp< source_location > | cached_location |
| Last cached location. | |
Represents cache, saving last report for examination. Used for testing.
Definition at line 55 of file report_cache.hh.
| lestes::msg::report_cache::report_cache | ( | const ptr< report_filter > & | a_output | ) | [protected] |
Creates the object.
Creates the report end filter.
location_get() == NULL
| a_output | The output of the filter. |
Definition at line 48 of file report_cache.cc.
Referenced by create().
00048 : 00049 report_filter(a_output), 00050 cached_message(NULL), 00051 cached_location(NULL) 00052 { 00053 }
| lestes::msg::report_cache::report_cache | ( | const report_cache & | ) | [private] |
Hides copy constructor.
| void lestes::msg::report_cache::process | ( | const ptr< message > & | a_message, | |
| const ptr< source_location > & | a_location | |||
| ) | [virtual] |
Caches a report.
Caches current report
a_location != NULL
| a_message | The message to cache. | |
| a_location | The location to cache. |
Implements lestes::msg::report_filter.
Definition at line 62 of file report_cache.cc.
References cached_location, cached_message, lassert, and lestes::msg::report_filter::process_output().
00064 { 00065 lassert(a_message); 00066 lassert(a_location); 00067 00068 cached_message = a_message; 00069 cached_location = a_location; 00070 00071 process_output(a_message,a_location); 00072 }
| ptr< message > lestes::msg::report_cache::message_get | ( | void | ) | const |
Returns cached message.
Returns the last message passed process().
Definition at line 78 of file report_cache.cc.
References cached_message.
00079 { 00080 return cached_message; 00081 }
| ptr< source_location > lestes::msg::report_cache::location_get | ( | void | ) | const |
Returns cached location.
Returns the last location passed to process().
Definition at line 87 of file report_cache.cc.
References cached_location.
00088 { 00089 return cached_location; 00090 }
| ptr< report_cache > lestes::msg::report_cache::create | ( | const ptr< report_filter > & | a_output | ) | [static] |
Returns new instance.
Returns new object.
| a_output | The output of the filter. |
Definition at line 98 of file report_cache.cc.
References report_cache().
00099 { 00100 return new report_cache(a_output); 00101 }
| report_cache& lestes::msg::report_cache::operator= | ( | const report_cache & | ) | [private] |
Hides assignment operator.
srp<message> lestes::msg::report_cache::cached_message [private] |
Last cached message.
Definition at line 71 of file report_cache.hh.
Referenced by message_get(), and process().
srp<source_location> lestes::msg::report_cache::cached_location [private] |
Last cached location.
Definition at line 73 of file report_cache.hh.
Referenced by location_get(), and process().
1.5.1-20070107