MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / propagateNeedsUpdate

Method propagateNeedsUpdate

ImagePlay/src/IPProcessGrid.cpp:168–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void IPProcessGrid::propagateNeedsUpdate(IPLProcess* process)
169{
170 qDebug() << "IPProcessGrid::propagateNeedsUpdate: " << QString::fromStdString(process->className());
171 QQueue<IPProcessStep*> tmpQueue;
172
173 // find step from process
174 for(auto it = _scene->steps()->begin(); it < _scene->steps()->end(); ++it)
175 {
176 IPProcessStep* step = (IPProcessStep*) *it;
177 IPLProcess* tmpProcess = step->process();
178
179 if(tmpProcess == process)
180 {
181 step->process()->requestUpdate();
182
183 tmpQueue.enqueue(step);
184 break;
185 }
186 }
187
188
189 // add all following processes via BFS
190 int counter = 0;
191 int limit = 100;
192 while(!tmpQueue.isEmpty() && counter < limit)
193 {
194 // set status
195 IPProcessStep* step = tmpQueue.dequeue();
196
197 for(auto it = step->edgesOut()->begin(); it < step->edgesOut()->end(); ++it)
198 {
199 IPProcessEdge* edge = (IPProcessEdge*) *it;
200 IPProcessStep* nextStep = edge->to();
201
202 nextStep->process()->requestUpdate();
203
204 // add to queue and list
205 tmpQueue.enqueue(nextStep);
206 }
207 }
208}
209
210void IPProcessGrid::propagateResultReady(IPLProcess* process, bool resultReady)
211{

Callers 1

addEdgeMethod · 0.80

Calls 7

stepsMethod · 0.80
edgesOutMethod · 0.80
toMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
processMethod · 0.45
requestUpdateMethod · 0.45

Tested by

no test coverage detected