--User changes

-Add 4 new possible arguments to EmberGenome:
  --allvars: Print the names of all supported variations.
  --regvars: Print the names of all supported regular variations.
  --prevars: Print the names of all supported pre variations.
  --postvars: Print the names of all supported post variations.
This commit is contained in:
mfeemster
2016-02-15 12:02:37 -08:00
parent 10c12b5250
commit 73356301da
12 changed files with 70 additions and 16 deletions

View File

@ -64,6 +64,39 @@ bool EmberGenome(EmberOptions& opt)
return true;
}
if (opt.AllVars() || opt.RegVars() || opt.PreVars() || opt.PostVars())
{
VariationList<T> vl;
if (opt.AllVars())
{
auto& vars = vl.AllVars();
for (auto& v : vars)
cout << v->Name() << "\n";
return true;
}
else
{
vector<Variation<T>*> vars;
if (opt.RegVars())
vars.insert(vars.end(), vl.RegVars().begin(), vl.RegVars().end());
if (opt.PreVars())
vars.insert(vars.end(), vl.PreVars().begin(), vl.PreVars().end());
if (opt.PostVars())
vars.insert(vars.end(), vl.PostVars().begin(), vl.PostVars().end());
for (auto& v : vars)
cout << v->Name() << "\n";
}
return true;
}
//Regular variables.
Timing t;
bool exactTimeMatch, randomMode, didColor, seqFlag;