Convenience base-class for simple filters which output a single message. More...
#include <simple_filter.h>
Public Types | |
typedef boost::function< void(const MConstPtr &)> | Callback |
typedef boost::function< void(const EventType &)> | EventCallback |
typedef ros::MessageEvent< M const > | EventType |
typedef boost::shared_ptr< M const > | MConstPtr |
Public Member Functions | |
const std::string & | getName () |
Get the name of this filter. For debugging use. | |
template<typename C > | |
Connection | registerCallback (const C &callback) |
Register a callback to be called when this filter has passed. | |
template<typename P > | |
Connection | registerCallback (const boost::function< void(P)> &callback) |
Register a callback to be called when this filter has passed. | |
template<typename P > | |
Connection | registerCallback (void(*callback)(P)) |
Register a callback to be called when this filter has passed. | |
template<typename T , typename P > | |
Connection | registerCallback (void(T::*callback)(P), T *t) |
Register a callback to be called when this filter has passed. | |
void | setName (const std::string &name) |
Set the name of this filter. For debugging use. | |
Protected Member Functions | |
void | signalMessage (const MConstPtr &msg) |
Call all registered callbacks, passing them the specified message. | |
void | signalMessage (const ros::MessageEvent< M const > &event) |
Call all registered callbacks, passing them the specified message. | |
Private Types | |
typedef Signal1< M > | Signal |
Private Attributes | |
std::string | name_ |
Signal | signal_ |
Convenience base-class for simple filters which output a single message.
SimpleFilter provides some of the tricky callback registering functionality, so that simple filters do not have to duplicate it. It also provides getName()/setName() for debugging purposes.
Definition at line 60 of file simple_filter.h.
typedef boost::function<void(const MConstPtr&)> message_filters::SimpleFilter< M >::Callback |
Definition at line 64 of file simple_filter.h.
typedef boost::function<void(const EventType&)> message_filters::SimpleFilter< M >::EventCallback |
Definition at line 66 of file simple_filter.h.
typedef ros::MessageEvent<M const> message_filters::SimpleFilter< M >::EventType |
Reimplemented in message_filters::Chain< M >, message_filters::Subscriber< M >, message_filters::TimeSequencer< M >, message_filters::Cache< M >, message_filters::PassThrough< M >, message_filters::PassThrough< Msg >, and Filter.
Definition at line 65 of file simple_filter.h.
typedef boost::shared_ptr<M const> message_filters::SimpleFilter< M >::MConstPtr |
Reimplemented in message_filters::Chain< M >, message_filters::Subscriber< M >, message_filters::TimeSequencer< M >, message_filters::Cache< M >, message_filters::PassThrough< M >, and message_filters::PassThrough< Msg >.
Definition at line 63 of file simple_filter.h.
typedef Signal1<M> message_filters::SimpleFilter< M >::Signal [private] |
Definition at line 139 of file simple_filter.h.
const std::string& message_filters::SimpleFilter< M >::getName | ( | ) | [inline] |
Get the name of this filter. For debugging use.
Definition at line 117 of file simple_filter.h.
Connection message_filters::SimpleFilter< M >::registerCallback | ( | const C & | callback | ) | [inline] |
Register a callback to be called when this filter has passed.
callback | The callback to call |
Definition at line 73 of file simple_filter.h.
Connection message_filters::SimpleFilter< M >::registerCallback | ( | const boost::function< void(P)> & | callback | ) | [inline] |
Register a callback to be called when this filter has passed.
callback | The callback to call |
Definition at line 84 of file simple_filter.h.
Connection message_filters::SimpleFilter< M >::registerCallback | ( | void(*)(P) | callback | ) | [inline] |
Register a callback to be called when this filter has passed.
callback | The callback to call |
Definition at line 94 of file simple_filter.h.
Connection message_filters::SimpleFilter< M >::registerCallback | ( | void(T::*)(P) | callback, |
T * | t | ||
) | [inline] |
Register a callback to be called when this filter has passed.
callback | The callback to call |
Definition at line 104 of file simple_filter.h.
void message_filters::SimpleFilter< M >::setName | ( | const std::string & | name | ) | [inline] |
Set the name of this filter. For debugging use.
Definition at line 113 of file simple_filter.h.
void message_filters::SimpleFilter< M >::signalMessage | ( | const MConstPtr & | msg | ) | [inline, protected] |
Call all registered callbacks, passing them the specified message.
Definition at line 123 of file simple_filter.h.
void message_filters::SimpleFilter< M >::signalMessage | ( | const ros::MessageEvent< M const > & | event | ) | [inline, protected] |
Call all registered callbacks, passing them the specified message.
Definition at line 133 of file simple_filter.h.
std::string message_filters::SimpleFilter< M >::name_ [private] |
Definition at line 143 of file simple_filter.h.
Signal message_filters::SimpleFilter< M >::signal_ [private] |
Definition at line 141 of file simple_filter.h.