virtual void output(devs::Time /*time*/, devs::ExternalEventList &output) const override { Ensures(i == 1); i++; output.emplace_back("out"); }
void Moore::output(devs::Time time, devs::ExternalEventList& output) const { if (mPhase == PROCESSING) { OutputFuncsIterator it = mOutputFuncs.find(currentState()); if (it != mOutputFuncs.end()) { (it->second)(time, output); } else { OutputsIterator ito = mOutputs.find(currentState()); if (ito != mOutputs.end()) { output.emplace_back(ito->second); } } } }
void Mealy::output(devs::Time time, devs::ExternalEventList& output) const { if (mPhase == PROCESSING) { const devs::ExternalEventList& events = *mToProcessEvents.front(); const devs::ExternalEvent& event = events.front(); OutputFuncsIterator itof = mOutputFuncs.find(currentState()); if (itof != mOutputFuncs.end() and itof->second.find(event.getPortName()) != itof->second.end()) { (itof->second.find(event.getPortName())->second)(time, output); } else { OutputsIterator ito = mOutputs.find(currentState()); if (ito != mOutputs.end() and ito->second.find(event.getPortName()) != ito->second.end()) { output.emplace_back( ito->second.find(event.getPortName())->second); } } } }
virtual void output(devs::Time /*time*/, devs::ExternalEventList &output) const override { output.emplace_back("out"); output.back().addString("leaf"); }
virtual void output(devs::Time /* time */, devs::ExternalEventList &output) const override { for (int i = 0; i < m_counter; ++i) output.emplace_back("out"); }