8 , manualTrigger(manualTrigger)
14 ERROR(
"void COutputPin::connectOutput(CInputPin* inputPin, size_t inputSlot)",
15 "The input pin cannot be null.");
17 outputs.push_back(std::make_pair(inputPin, inputSlot));
20 inputPin->setInputTrigger(inputSlot,
this);
26 ERROR(
"void COutputPin::onOutputReady(CDataPacketPtr packet)",
27 "The packet cannot be null.");
41 ERROR(
"void COutputPin::deliverOuput(CDataPacketPtr packet)",
42 "The packet cannot be null.");
44 std::vector<std::pair<std::shared_ptr<CInputPin>,
size_t> >::iterator it, itEnd;
45 for (it =
outputs.begin(), itEnd =
outputs.end(); it != itEnd; ++it)
46 it->first->setInput(it->second, packet);
53 std::map<Time, CDataPacketPtr>::iterator it =
outputPackets.find(timestamp);
70 std::vector<std::pair<std::shared_ptr<CInputPin>,
size_t> >::const_iterator it, itEnd;
71 for (it =
outputs.begin(), itEnd =
outputs.end(); it != itEnd; ++it)
73 if (it->first->mustAutoTrigger())
82 std::vector<std::pair<std::shared_ptr<CInputPin>,
size_t> >::iterator it, itEnd;
83 for (it =
outputs.begin(), itEnd =
outputs.end(); it != itEnd; ++it)
84 it->first->setInputTrigger(it->second,
this);
89 std::vector<std::pair<std::shared_ptr<CInputPin>,
size_t> >::const_iterator it, itEnd;
90 for (it =
outputs.begin(), itEnd =
outputs.end(); it != itEnd; ++it)
92 if (it->first->isDataExpected(date))
virtual bool canBeTriggered() const
Tests if the pin can be triggered.
std::shared_ptr< CDataPacket > CDataPacketPtr
void deliverOuput(CDataPacketPtr packet)
Delivers an output packet to the downstreams filter.
void connectOutput(std::shared_ptr< CInputPin > inputPin, size_t inputSlot)
Connects to a specific slot of the input pin of a downstream filter.
COutputPin(CGarbageCollector &gc, bool manualTrigger=false)
Constructs an ouput pin with manual or automatic trigger and an associated garbage collector...
void registerObject(InvalidableObject *object, Time timestamp)
Registers an object for a specified timestamp.
bool manualTrigger
The list of connected filters and the corresponding slot numbers.
long long int Time
////////////////////// Déclarations ////////////////////// ///
void onOutputReady(CDataPacketPtr packet)
Function triggered when a packet is ready to be delivered.
virtual void invalidate(Time timestamp)
Removes all pending packets which are older than the specified timestamp.
virtual bool isDataExpected(const CDate &date) const
Tests whether data is expected for the specified date.
CGarbageCollector & gc
The garbage collector associated to the output pin.
CATCH CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar *scalarDestination, CScalar *scalarSource, CReduceScalarToScalar *algo ERROR)("CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo)",<< "Operation must be defined."<< "Scalar source "<< scalarSource->getId()<< std::endl<< "Scalar destination "<< scalarDestination->getId())
void setOutputTriggers()
Informs the downstream pins that this output pin should be triggered.
virtual void trigger(Time timestamp)
Triggers the output of any buffered packet for the specified timestamp.
std::map< Time, CDataPacketPtr > outputPackets
Output buffer, store the packets until the output is triggered.
void unregisterObject(InvalidableObject *object, Time timestamp)
Removes a object previously registered for a specified timestamp.
A basic garbage collector which ensures no old packets linger in the filter graph.
virtual bool mustAutoTrigger() const
Tests if the pin must auto-trigger.
std::vector< std::pair< std::shared_ptr< CInputPin >, size_t > > outputs