41 for (
int i = 0; i < n ; i++)
43 std::cout <<
"[Loop] Emitting iteration " << i << std::endl;
52 std::cout <<
"[DInt] Received integer " << i << std::endl;
58 std::cout <<
"[DInt] Recieved integer array " << std::endl;
59 for (
int i = 0 ; i < ia.getSize() ; i++)
61 std::cout <<
"\t" << ia[i] << std::endl;
67 void StackExploder::tic()
70 if (calls % 1000 == 0)
71 std::cout <<
"[Stack] " << calls <<
" calls performed." << std::endl;
76 ComponentNester::ComponentNester(QObject* parent) : QObject(parent)
81 void ComponentNester::setComponent(QObject* cmp)
83 std::cout <<
"[NCmp] Nesting component" << std::endl;
84 Loop* loop =
dynamic_cast<Loop*
>(cmp);
89 nestedComponent = loop;
91 std::cout <<
"[NCmp] Nesting succeeded" << std::endl;
94 void ComponentNester::setIterations(
int n)
96 std::cout <<
"[NCmp] Nesting iteration calls" << std::endl;
97 if (nestedComponent == 0)
101 std::cout <<
"[NCmp] Iterations transmitted" << std::endl;
104 void Sleeper::setSeconds(
int n)
106 std::cout <<
"[Slp] I will sleep " << n <<
" seconds." << std::endl;
107 for (
int i=0; i < n ; i++)
109 std::cout <<
"[Slp] " << qPrintable(text) <<
" is sleeping "
119 emit sendToken(
"end");
void display(int i)
Displays in the console the number passed as a parameter.
void setIterations(int n)
Gives the number of iterations.
Template class to implement arrays.
This class is a loop sending as much iterations as needed.
void newIteration(int i)
Sends an iteration.
void sendToken(QString s)
Sends a token once the number of iterations have been reached.