Ignore:
Timestamp:
01/10/17 14:36:29 (7 years ago)
Author:
oabramkina
Message:

Intermeadiate version for merging with new server functionalities.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/filter/filter.cpp

    r827 r1021  
    55  CFilter::CFilter(CGarbageCollector& gc, size_t inputSlotsCount, IFilterEngine* engine) 
    66    : CInputPin(gc, inputSlotsCount) 
    7     , COutputPin() 
     7    , COutputPin(gc) 
    88    , engine(engine) 
    99    , inputSlotCount(inputSlotCount) 
     
    1414    CDataPacketPtr outputPacket = engine->apply(data); 
    1515    if (outputPacket) 
    16       deliverOuput(outputPacket); 
     16      onOutputReady(outputPacket); 
     17  } 
     18 
     19  void CFilter::setInputTrigger(size_t inputSlot, COutputPin* trigger) 
     20  { 
     21    // Was the filter already triggerable? If not, we need to inform 
     22    // all downstream filters. 
     23    bool wasTriggerable = canBeTriggered(); 
     24 
     25    CInputPin::setInputTrigger(inputSlot, trigger); 
     26 
     27    if (!wasTriggerable) 
     28      setOutputTriggers(); 
     29  } 
     30 
     31  void CFilter::trigger(Time timestamp) 
     32  { 
     33    CInputPin::trigger(timestamp); 
     34 
     35    COutputPin::trigger(timestamp); 
     36  } 
     37 
     38  bool CFilter::canBeTriggered() const 
     39  { 
     40    return (CInputPin::canBeTriggered() || COutputPin::canBeTriggered()); 
    1741  } 
    1842} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.