#include #include "checkHost.h" #include "execContext.h" #include CheckHost::CheckHost(ScriptNodePtr s) : CommonObjects(s) { s->script->loader.addLoadTarget(s, Storer::into(&checks)); } CheckHost::~CheckHost() { } void CheckHost::runChecks(ExecContext * ec) const { loadScriptComponents(); BOOST_FOREACH(const Checks::value_type & pc, checks) { if (!pc->performCheck(ec)) { ec->logMessage(false, pc->group(ec), pc->message(ec)); throw CheckFailure(pc); } } } CheckHost::CheckFailure::CheckFailure(CheckCPtr fc) : failedCheck(fc) { } CheckHost::CheckFailure::~CheckFailure() throw() { }