source: XIOS/dev/branch_yushan/src/filter/filter.cpp @ 1126

Last change on this file since 1126 was 1056, checked in by yushan, 7 years ago

one file mode OK. Tested with test_client

File size: 484 bytes
Line 
1#include "filter.hpp"
2
3namespace xios
4{
5  CFilter::CFilter(CGarbageCollector& gc, size_t inputSlotsCount, IFilterEngine* engine)
6    : CInputPin(gc, inputSlotsCount)
7    , COutputPin()
8    , engine(engine)
9    , inputSlotCount(inputSlotCount)
10  { /* Nothing to do */ }
11
12  void CFilter::onInputReady(std::vector<CDataPacketPtr> data)
13  {
14    CDataPacketPtr outputPacket = engine->apply(data);
15    if (outputPacket)
16    {
17      deliverOuput(outputPacket);
18    }
19  }
20} // namespace xios
Note: See TracBrowser for help on using the repository browser.