Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes
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]

List of all members.

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_

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
template<class M>
typedef boost::shared_ptr<M const> message_filters::SimpleFilter< M >::MConstPtr
template<class M>
typedef Signal1<M> message_filters::SimpleFilter< M >::Signal [private]

Definition at line 139 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 117 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 104 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 113 of file simple_filter.h.

template<class M>
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.

template<class M>
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.


Member Data Documentation

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

Definition at line 143 of file simple_filter.h.

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

Definition at line 141 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 Tue Mar 7 2017 04:01:23