Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
message_filters::SimpleFilter< M > Class Template Reference

Convenience base-class for simple filters which output a single message. More...

#include <simple_filter.h>

Inheritance diagram for message_filters::SimpleFilter< M >:
Inheritance graph
[legend]

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. More...
 
template<typename C >
Connection registerCallback (const C &callback)
 Register a callback to be called when this filter has passed. More...
 
template<typename P >
Connection registerCallback (const boost::function< void(P)> &callback)
 Register a callback to be called when this filter has passed. More...
 
template<typename P >
Connection registerCallback (void(*callback)(P))
 Register a callback to be called when this filter has passed. More...
 
template<typename T , typename P >
Connection registerCallback (void(T::*callback)(P), T *t)
 Register a callback to be called when this filter has passed. More...
 
void setName (const std::string &name)
 Set the name of this filter. For debugging use. More...
 

Protected Member Functions

void signalMessage (const MConstPtr &msg)
 Call all registered callbacks, passing them the specified message. More...
 
void signalMessage (const ros::MessageEvent< M const > &event)
 Call all registered callbacks, passing them the specified message. More...
 

Private Types

typedef Signal1< M > Signal
 

Private Attributes

std::string name_
 
Signal signal_
 

Detailed Description

template<class M>
class message_filters::SimpleFilter< M >

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.

Member Typedef Documentation

template<class M>
typedef boost::function<void(const MConstPtr&)> message_filters::SimpleFilter< M >::Callback

Definition at line 64 of file simple_filter.h.

template<class M>
typedef boost::function<void(const EventType&)> message_filters::SimpleFilter< M >::EventCallback

Definition at line 66 of file simple_filter.h.

template<class M>
typedef ros::MessageEvent<M const> message_filters::SimpleFilter< M >::EventType

Definition at line 65 of file simple_filter.h.

template<class M>
typedef boost::shared_ptr<M const> message_filters::SimpleFilter< M >::MConstPtr

Definition at line 63 of file simple_filter.h.

template<class M>
typedef Signal1<M> message_filters::SimpleFilter< M >::Signal
private

Definition at line 140 of file simple_filter.h.

Member Function Documentation

template<class M>
const std::string& message_filters::SimpleFilter< M >::getName ( )
inline

Get the name of this filter. For debugging use.

Definition at line 118 of file simple_filter.h.

template<class M>
template<typename C >
Connection message_filters::SimpleFilter< M >::registerCallback ( const C &  callback)
inline

Register a callback to be called when this filter has passed.

Parameters
callbackThe callback to call

Definition at line 73 of file simple_filter.h.

template<class M>
template<typename P >
Connection message_filters::SimpleFilter< M >::registerCallback ( const boost::function< void(P)> &  callback)
inline

Register a callback to be called when this filter has passed.

Parameters
callbackThe callback to call

Definition at line 84 of file simple_filter.h.

template<class M>
template<typename P >
Connection message_filters::SimpleFilter< M >::registerCallback ( void(*)(P)  callback)
inline

Register a callback to be called when this filter has passed.

Parameters
callbackThe callback to call

Definition at line 94 of file simple_filter.h.

template<class M>
template<typename T , typename P >
Connection message_filters::SimpleFilter< M >::registerCallback ( void(T::*)(P)  callback,
T *  t 
)
inline

Register a callback to be called when this filter has passed.

Parameters
callbackThe callback to call

Definition at line 105 of file simple_filter.h.

template<class M>
void message_filters::SimpleFilter< M >::setName ( const std::string &  name)
inline

Set the name of this filter. For debugging use.

Definition at line 114 of file simple_filter.h.

template<class M>
void message_filters::SimpleFilter< M >::signalMessage ( const MConstPtr msg)
inlineprotected

Call all registered callbacks, passing them the specified message.

Definition at line 124 of file simple_filter.h.

template<class M>
void message_filters::SimpleFilter< M >::signalMessage ( const ros::MessageEvent< M const > &  event)
inlineprotected

Call all registered callbacks, passing them the specified message.

Definition at line 134 of file simple_filter.h.

Member Data Documentation

template<class M>
std::string message_filters::SimpleFilter< M >::name_
private

Definition at line 144 of file simple_filter.h.

template<class M>
Signal message_filters::SimpleFilter< M >::signal_
private

Definition at line 142 of file simple_filter.h.


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


message_filters
Author(s): Josh Faust, Vijay Pradeep
autogenerated on Sun Feb 3 2019 03:30:08