My Project
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
 

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 46 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 156 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 163 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 206 of file filter_chain.hh.

◆ 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 184 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 173 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 196 of file filter_chain.hh.

References input.


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