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

Function foreach

src/openms_gui/source/VISUAL/TOPPASEdge.cpp:431–456  ·  view source on GitHub ↗

check file type compatibility

Source from the content-addressed store, hash-verified

429
430 // check file type compatibility
431 foreach(const QString& q_file_name, file_names)
432 {
433 bool type_mismatch = true;
434 const String& file_name = String(q_file_name);
435 String::SizeType extension_start_index = file_name.rfind(".");
436 if (extension_start_index != String::npos)
437 {
438 String extension = file_name.substr(extension_start_index + 1);
439 extension.toLower();
440 for (StringList::iterator it = target_param_types.begin(); it != target_param_types.end(); ++it)
441 {
442 String other_ext = *it;
443 other_ext.toLower();
444 if (extension == other_ext || extension == "gz" || extension == "bz2")
445 {
446 type_mismatch = false;
447 break;
448 }
449 }
450 }
451
452 if (type_mismatch)
453 {
454 return ES_FILE_EXT_MISMATCH;
455 }
456 }
457
458 // all file types ok
459 return ES_VALID;

Callers

nothing calls this directly

Calls 5

substrMethod · 0.80
toLowerMethod · 0.80
StringClass · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected