TFilterChain< Handler > Class Template Reference

create and use a chain of filters More...

#include <mia/template/filter_chain.hh>

Public Types

typedef PFilter::element_type::plugin_data::Pointer PData
 the pointer type of the data to be filtered More...
 

Public Member Functions

bool empty () const
 
void push_back (const char *filter)
 
void push_front (const char *filter)
 
PData run (PData input) const
 
 TFilterChain (const char *filters[], int nfilters)
 
 TFilterChain (std::vector< std::string > filters)
 

Detailed Description

template<typename Handler>
class TFilterChain< Handler >

create and use a chain of filters

This template is used to create and use a chain of filters.

Template Parameters
aplug-in handler that is used to create the filters from strings

Definition at line 40 of file filter_chain.hh.

Member Typedef Documentation

◆ PData

template<typename Handler>
typedef PFilter::element_type::plugin_data::Pointer TFilterChain< Handler >::PData

the pointer type of the data to be filtered

Definition at line 45 of file filter_chain.hh.

Constructor & Destructor Documentation

◆ TFilterChain() [1/2]

template<typename Handler >
TFilterChain< Handler >::TFilterChain ( const char *  filters[],
int  nfilters 
)

The filter chain constrctor

Parameters
filtersan array of strings describing the filters
nfiltersnumber of parameter strings

Definition at line 155 of file filter_chain.hh.

◆ TFilterChain() [2/2]

template<typename Handler >
TFilterChain< Handler >::TFilterChain ( std::vector< std::string >  filters)

The filter chain constrctor

Parameters
filtersa vector of strings describing the filters

Definition at line 162 of file filter_chain.hh.

Member Function Documentation

◆ empty()

template<typename Handler >
bool TFilterChain< Handler >::empty ( ) const
Returns
true if the chain doesn't contain any filters

Definition at line 200 of file filter_chain.hh.

References NS_MIA_END.

◆ push_back()

template<typename Handler >
void TFilterChain< Handler >::push_back ( const char *  filter)

Add a filter at the end of the chain

Definition at line 180 of file filter_chain.hh.

References filter().

◆ push_front()

template<typename Handler >
void TFilterChain< Handler >::push_front ( const char *  filter)

Add a filter at the front of the chain

Definition at line 170 of file filter_chain.hh.

References filter().

◆ run()

template<typename Handler>
TFilterChain< Handler >::PData TFilterChain< Handler >::run ( PData  input) const

Runs the filter chain. the input data will not be changed.

Parameters
inputthe input data given as shared pointer
Returns
the filtered data as shared pointer

Definition at line 191 of file filter_chain.hh.

References input.


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