A3t
- Implemented A3t::apply_overrides.
This commit is contained in:
18
src/A3t.cpp
18
src/A3t.cpp
@@ -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/
|
// /pattern/
|
||||||
void A3t::findPattern ()
|
void A3t::findPattern ()
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public:
|
|||||||
void findConfigOverride ();
|
void findConfigOverride ();
|
||||||
void get_overrides (std::string&, File&);
|
void get_overrides (std::string&, File&);
|
||||||
void get_data_location (Path&);
|
void get_data_location (Path&);
|
||||||
|
void apply_overrides ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void findBinary ();
|
void findBinary ();
|
||||||
|
|||||||
Reference in New Issue
Block a user