Template Class CachedComparisonHandler
Defined in File delta_filter.hpp
Inheritance Relationships
Base Type
public message_filters::ComparisonHandler< MessageType >(Template Class ComparisonHandler)
Derived Type
public message_filters::DeltaCompare< MessageType >(Template Class DeltaCompare)
Class Documentation
-
template<typename MessageType>
class CachedComparisonHandler : public message_filters::ComparisonHandler<MessageType> CachedComparisonHandler implements messages comparison field by field.
A successor to this class should implement ‘do_fields_fit’ method. If any of the fields provided to the ‘do_fields_fit’ method do satisfy a comparison conditions the message is accepted. That means that the message is stored in the ‘message_cache_’ and the ‘message_fits’ method returns ‘true’.
Subclassed by message_filters::DeltaCompare< MessageType >
Public Types
-
typedef std::shared_ptr<MessageType const> MConstPtr
-
typedef MessageEvent<MessageType const> EventType
-
typedef std::function<MFieldType(const MConstPtr&)> FieldGetterFunctionType
Public Functions
-
inline explicit CachedComparisonHandler(std::forward_list<FieldGetterFunctionType> field_getters)
Initialize handler.
- Parameters:
field_getters – A list of callable objects that are expected to retrieve a value of a basic type from a message field for comparison. Any of the ‘field_getters’ is applied to the cached and to the current message. The returned values are compared. If any of these values differ between cached and current message, the current message is accepted.
-
virtual ~CachedComparisonHandler() = default
-
virtual bool do_fields_fit(MFieldType field_a, MFieldType field_b) const = 0
-
typedef std::shared_ptr<MessageType const> MConstPtr