diff options
Diffstat (limited to 'project2/common/cache.cpp')
-rw-r--r-- | project2/common/cache.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/project2/common/cache.cpp b/project2/common/cache.cpp index 9be5845..2a1d410 100644 --- a/project2/common/cache.cpp +++ b/project2/common/cache.cpp @@ -9,17 +9,17 @@ Cache::Cache(ScriptNodePtr p) : IHaveParameters(p), SourceObject(p), - inherit(p->value("inherit", true).as<bool>()) + inherit(p->value("inherit", true, NULL).as<bool>()) { } -bool Cache::checkAndExecute(const Glib::ustring & n, const Glib::ustring & f, const RowProcessor * rp) +bool Cache::checkAndExecute(ExecContext * ec, const Glib::ustring & n, const Glib::ustring & f, const IHaveParameters * p, const RowProcessorCallback & rp) { - RowSetCPtr cached = getCachedRowSet(n, f, rp); + RowSetCPtr cached = getCachedRowSet(ec, n, f, p); if (cached) { try { Logger()->messagebf(LOG_DEBUG, "Executing from cache '%s'", name); - cached->execute(f, rp); + cached->execute(f, rp, ec); return true; } catch (const Glib::Exception & e) { @@ -36,14 +36,14 @@ bool Cache::checkAndExecute(const Glib::ustring & n, const Glib::ustring & f, co } void -Cache::applyKeys(const boost::function2<void, const std::string &, const VariableType &> & f, const IHaveParameters * ps) const +Cache::applyKeys(ExecContext * ec, const KeyApplier & f, const IHaveParameters * ps) const { BOOST_FOREACH(const IHaveParameters::Parameters::value_type & p, allParameters()) { - f(p.first, p.second); + f(p.first, p.second(ec)); } if (inherit) { BOOST_FOREACH(const IHaveParameters::Parameters::value_type & p, ps->allParameters()) { - f(p.first, p.second); + f(p.first, p.second(ec)); } } } |