21 #ifndef __mia_fifofilter_hh
22 #define __mia_fifofilter_hh
27 #include <boost/call_traits.hpp>
30 #ifndef EXPORT_HANDLER
32 #define EXPORT_HANDLER __declspec(dllimport)
34 #define EXPORT_HANDLER
57 typedef std::shared_ptr<TFifoFilter >
Pointer;
67 TFifoFilter(
size_t width,
size_t min_fill,
size_t read_start);
73 void push(typename ::boost::call_traits<T>::param_type x);
83 void append_filter(
Pointer last);
86 size_t get_pos()
const;
89 size_t get_buffer_size()
const;
92 size_t get_start()
const;
95 size_t get_end()
const;
105 virtual void do_initialize(typename ::boost::call_traits<T>::param_type x);
112 virtual void do_push(typename ::boost::call_traits<T>::param_type x) = 0;
118 virtual T do_filter();
123 virtual void post_finalize();
129 virtual void shift_buffer();
136 virtual void evaluate(
size_t slice);
143 size_t m_start_slice;
157 template <
typename T>
165 typedef std::shared_ptr< TFifoFilterSink<T>>
Pointer;
177 virtual void do_push(typename ::boost::call_traits<T>::param_type x);
192 template <
typename T>
193 struct __copy_create_ptr {
194 static std::shared_ptr<T > apply (typename ::boost::call_traits<T>::param_type x)
196 return std::shared_ptr<T >(
new T(x));