MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / getEdgeStatus

Method getEdgeStatus

src/openms_gui/source/VISUAL/TOPPASEdge.cpp:462–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460 }
461
462 TOPPASEdge::EdgeStatus TOPPASEdge::getEdgeStatus()
463 {
464 TOPPASVertex* source = getSourceVertex();
465 TOPPASVertex* target = getTargetVertex();
466 TOPPASMergerVertex* source_merger = qobject_cast<TOPPASMergerVertex*>(source);
467 TOPPASMergerVertex* target_merger = qobject_cast<TOPPASMergerVertex*>(target);
468 TOPPASSplitterVertex* source_splitter = qobject_cast<TOPPASSplitterVertex*>(source);
469 TOPPASSplitterVertex* target_splitter = qobject_cast<TOPPASSplitterVertex*>(target);
470 TOPPASInputFileListVertex* source_input_list = qobject_cast<TOPPASInputFileListVertex*>(source);
471 TOPPASOutputFileListVertex* target_output_list = qobject_cast<TOPPASOutputFileListVertex*>(target);
472 TOPPASToolVertex* source_tool = qobject_cast<TOPPASToolVertex*>(source);
473 TOPPASToolVertex* target_tool = qobject_cast<TOPPASToolVertex*>(target);
474
475 if (source_tool && source_out_param_ < 0)
476 {
477 return ES_NO_SOURCE_PARAM;
478 }
479
480 if (target_tool && target_in_param_ < 0)
481 {
482 return ES_NO_TARGET_PARAM;
483 }
484
485 if (source_tool)
486 {
487 if (target_output_list) // edges to output vertices are always valid
488 {
489 return ES_VALID;
490 }
491 if (target_tool)
492 {
493 return getToolToolStatus_(source_tool, source_out_param_, target_tool, target_in_param_);
494 }
495 }
496
497 if (source_input_list && target_tool)
498 {
499 return getListToolStatus_(source_input_list, target_tool, target_in_param_);
500 }
501
502 if (source_merger || source_splitter)
503 {
504 // check compatibility of source with all target nodes of merger (or splitter)
505 for (TOPPASVertex::ConstEdgeIterator e_it = source->inEdgesBegin(); e_it != source->inEdgesEnd(); ++e_it)
506 {
507 TOPPASEdge* merger_in_edge = *e_it;
508 TOPPASToolVertex* merger_in_tool = qobject_cast<TOPPASToolVertex*>(merger_in_edge->getSourceVertex());
509 TOPPASInputFileListVertex * merger_in_list = qobject_cast<TOPPASInputFileListVertex*>(merger_in_edge->getSourceVertex());
510
511 if (merger_in_tool && target_tool)
512 {
513 EdgeStatus es = getToolToolStatus_(merger_in_tool, merger_in_edge->getSourceOutParam(), target_tool, target_in_param_);
514 if (es != ES_VALID)
515 {
516 return es;
517 }
518 }
519 else if (merger_in_list)

Callers 2

foreachFunction · 0.80
checkValidity_Method · 0.80

Calls 8

inEdgesBeginMethod · 0.80
inEdgesEndMethod · 0.80
getSourceVertexMethod · 0.80
getSourceOutParamMethod · 0.80
outEdgesBeginMethod · 0.80
outEdgesEndMethod · 0.80
getTargetVertexMethod · 0.80
getTargetInParamMethod · 0.80

Tested by

no test coverage detected