Commit 1838f35c authored by sgepner's avatar sgepner
Browse files

Adding suggestions from the CR

parent df3c0005
......@@ -284,7 +284,13 @@ int main(int argc, char* argv[])
if (i < nInput || i == modcmds.size() - 1)
{
//assume all modules are input unless last, or specified to be :out
module.first = (i < nInput ? eInputModule : eOutputModule);
if (tmp1.size() > 1 && tmp1.back()=="out")
{
module.first = eOutputModule;
tmp1.pop_back();
}
// If no colon detected, automatically detect mesh type from
// file extension. Otherwise override and use tmp1[1] as the
......@@ -299,7 +305,7 @@ int main(int argc, char* argv[])
// with input files.
string guess;
if (i < nInput)
if (module.first == eInputModule)
{
guess = InputModule::GuessFormat(tmp1[0]);
}
......@@ -329,27 +335,16 @@ int main(int argc, char* argv[])
}
module.second = ext;
tmp1.push_back(string(i < nInput ? "infile=" :
tmp1.push_back(string(module.first == eInputModule ? "infile=" :
"outfile=") +tmp1[0]);
}
}
else
{
if(tmp1.back()!="out")
{
module.second = tmp1[1];
tmp1.push_back(string(i < nInput ? "infile=" : "outfile=")
+ tmp1[0]);
offset++;
}
else //Here I try to have an additional output module
{
module.first = eOutputModule;
module.second = tmp1[1];
tmp1.push_back(string("outfile=")
+ tmp1[0]);
offset++;
}
module.second = tmp1[1];
tmp1.push_back(string(module.first == eInputModule ? "infile=" : "outfile=")
+ tmp1[0]);
offset++;
}
}
else
......@@ -362,7 +357,7 @@ int main(int argc, char* argv[])
mod = GetModuleFactory().CreateInstance(module, f);
modules.push_back(mod);
if (i < nInput && module.first != eOutputModule)
if (module.first == eInputModule)
{
inputModule = std::dynamic_pointer_cast<InputModule>(mod);
inputModule->AddFile(module.second, tmp1[0]);
......
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