Commit fa69382b authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

fixed operator info not beeing printed

parent 9d341465
Pipeline #5026 passed with stages
in 16 minutes and 39 seconds
......@@ -18,7 +18,7 @@ ModListOptions::requested(std::string name)
bool
ModListOptions::modInfoRequested()
{
return (printAll || requested(s_obase) || requested(s_arbIn) || requested(s_onlyFiles) || requested(s_onlyFirst)
return (operInfoRequested || printAll || requested(s_obase) || requested(s_arbIn) || requested(s_onlyFiles) || requested(s_onlyFirst)
|| requested(s_arbIn) || requested(s_noOutput));
}
......@@ -36,7 +36,8 @@ ModListOptions::parseRequest(std::string &requestString)
auto it = findModule(splitString[i]);
if (it != modules.end())
{
std::cerr << splitString[i] << ": "<< it->second.toString() << std::endl;
operInfoRequested = true;
std::cerr << splitString[i] << ": " << it->second.toString() << std::endl;
}
else
{
......
......@@ -15,6 +15,7 @@ const std::string s_noOutput = "noOutput";
struct ModListOptions
{
bool printAll = false;
bool operInfoRequested = false;
std::map<const std::string, int> opt
= { { s_obase, false }, { s_arbIn, false }, { s_onlyFiles, false }, { s_onlyFirst, false }, { s_noOutput, false } };
......
......@@ -52,7 +52,8 @@ module_t::toString()
if (restrictions == OnlyFirst) restriction = "Can only be the first operator";
if (restrictions == FilesOnly)
restriction != Green("none") ? restriction = Yellow("Can only use files as input.") : restriction += Yellow(", Can only use files as input");
restriction != Green("none") ? restriction = Yellow("Can only use files as input.")
: restriction += Yellow(", Can only use files as input");
std::string desc = "Input: " + inp + ", Ouput: " + out + ", Restricton: " + restriction;
......@@ -733,7 +734,6 @@ get_original(const char *operatorName)
std::map<std::string, module_t>::iterator
findModule(const std::string &operator_name)
{
auto modIter = modules_map.end();
std::string operName = operator_name;
auto it = aliases.find(operName);
......@@ -742,10 +742,15 @@ findModule(const std::string &operator_name)
operName = it->second;
}
modIter = modules_map.find(operName);
return modules.find(get_module_name_to(operator_name));
auto modMapIter = modules_map.find(operName);
auto modIter = modules.end();
if (!(modMapIter == modules_map.end()))
{
modIter = modules.find(modMapIter->second);
}
return modIter;
}
module_t &
getModule(const std::string &operator_name)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment