lestes::msg::report_cache Class Reference

Report cache. More...

#include <report_cache.hh>

Inheritance diagram for lestes::msg::report_cache:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual void process (const ptr< message > &a_message, const ptr< source_location > &a_location)
 Caches a report.
ptr< messagemessage_get (void) const
 Returns cached message.
ptr< source_location > location_get (void) const
 Returns cached location.

Static Public Member Functions

static ptr< report_cachecreate (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_cacheoperator= (const report_cache &)
 Hides assignment operator.

Private Attributes

srp< messagecached_message
 Last cached message.
srp< source_location > cached_location
 Last cached location.

Detailed Description

Report cache.

Represents cache, saving last report for examination. Used for testing.


Constructor & Destructor Documentation

lestes::msg::report_cache::report_cache ( const ptr< report_filter > &  a_output  )  [protected]

Creates the object.

Creates the report end filter.

Postcondition:
message_get() == NULL

location_get() == NULL

Parameters:
a_output The output of the filter.

lestes::msg::report_cache::report_cache ( const report_cache  )  [private]

Hides copy constructor.


Member Function Documentation

void lestes::msg::report_cache::process ( const ptr< message > &  a_message,
const ptr< source_location > &  a_location 
) [virtual]

Caches a report.

Caches current report

Precondition:
a_message != NULL

a_location != NULL

Parameters:
a_message The message to cache.
a_location The location to cache.

Implements lestes::msg::report_filter.

ptr< message > lestes::msg::report_cache::message_get ( void   )  const

Returns cached message.

Returns the last message passed process().

Returns:
Last message or NULL if process() was not called yet.

ptr< source_location > lestes::msg::report_cache::location_get ( void   )  const

Returns cached location.

Returns the last location passed to process().

Returns:
Last location or NULL if process() was not called yet.

ptr< report_cache > lestes::msg::report_cache::create ( const ptr< report_filter > &  a_output  )  [static]

Returns new instance.

Returns new object.

Precondition:
a_output != NULL
Parameters:
a_output The output of the filter.
Returns:
New report cache filter.

report_cache& lestes::msg::report_cache::operator= ( const report_cache  )  [private]

Hides assignment operator.


Member Data Documentation

srp<message> lestes::msg::report_cache::cached_message [private]

Last cached message.

srp<source_location> lestes::msg::report_cache::cached_location [private]

Last cached location.


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:49:42 2007 for lestes by doxygen 1.5.1-20070107