- Implemented A3t::apply_overrides.
This commit is contained in:
Paul Beckingham 2014-04-14 00:24:54 -04:00
parent a91101919d
commit 5c6486427b
2 changed files with 19 additions and 0 deletions

View file

@ -386,6 +386,24 @@ void A3t::get_data_location (Path& data)
}
}
////////////////////////////////////////////////////////////////////////////////
// Takes all CONFIG name/value pairs and overrides configuration.
// leaving only the plain args.
void A3t::apply_overrides ()
{
std::vector <Tree*>::iterator i;
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
{
if ((*i)->hasTag ("CONFIG"))
{
std::string name = (*i)->attribute ("name");
std::string value = (*i)->attribute ("value");
context.config.set (name, value);
context.footnote (format (STRING_A3_OVERRIDE_RC, name, value));
}
}
}
////////////////////////////////////////////////////////////////////////////////
// /pattern/
void A3t::findPattern ()

View file

@ -47,6 +47,7 @@ public:
void findConfigOverride ();
void get_overrides (std::string&, File&);
void get_data_location (Path&);
void apply_overrides ();
private:
void findBinary ();