Public Member Functions | List of all members
ros::console::FilterBase Class Reference

Base-class for filters. Filters allow full user-defined control over whether or not a message should print. The ROS_X_FILTER... macros provide the filtering functionality. More...

#include <console.h>

Inheritance diagram for ros::console::FilterBase:
Inheritance graph
[legend]

Public Member Functions

virtual bool isEnabled ()
 Returns whether or not the log statement should be printed. Called before the log arguments are evaluated and the message is formatted. More...
 
virtual bool isEnabled (FilterParams &)
 Returns whether or not the log statement should be printed. Called once the message has been formatted, and allows you to change the message, logger and severity level if necessary. More...
 
virtual ~FilterBase ()
 

Detailed Description

Base-class for filters. Filters allow full user-defined control over whether or not a message should print. The ROS_X_FILTER... macros provide the filtering functionality.

Filters get a chance to veto the message from printing at two times: first before the message arguments are evaluated and the message is formatted, and then once the message is formatted before it is printed. It is also possible to change the message, logger and severity level at this stage (see the FilterParams struct for more details).

When a ROS_X_FILTER... macro is called, here is the high-level view of how it uses the filter passed in:

if (<logging level is enabled> && filter->isEnabled())
{
  <format message>
  <fill out FilterParams>
  if (filter->isEnabled(params))
  {
    <print message>
  }
}

Definition at line 226 of file console.h.

Constructor & Destructor Documentation

virtual ros::console::FilterBase::~FilterBase ( )
inlinevirtual

Definition at line 229 of file console.h.

Member Function Documentation

virtual bool ros::console::FilterBase::isEnabled ( )
inlinevirtual

Returns whether or not the log statement should be printed. Called before the log arguments are evaluated and the message is formatted.

Reimplemented in BasicFilter.

Definition at line 234 of file console.h.

virtual bool ros::console::FilterBase::isEnabled ( FilterParams )
inlinevirtual

Returns whether or not the log statement should be printed. Called once the message has been formatted, and allows you to change the message, logger and severity level if necessary.

Reimplemented in ChangeFilter, and AdvancedFilter.

Definition at line 239 of file console.h.


The documentation for this class was generated from the following file:


rosconsole
Author(s): Josh Faust
autogenerated on Sun Feb 3 2019 03:29:44