#include "sample.h" // header declaring components #include void Loop::setIterations(int n) { for (int i=0; i < n; i++) { std::cout << "[Loop] Emitting iteration " << i << std::endl; emit newIteration(i); // emit trigger the corresponding signal } emit sendToken("end"); } void DisplayInt::display(int i) { std::cout << "[DInt] Received integer " << i << std::endl; }