diff options
Diffstat (limited to 'project2/common/environment.cpp')
-rw-r--r-- | project2/common/environment.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/project2/common/environment.cpp b/project2/common/environment.cpp index 0b9a1fe..a996408 100644 --- a/project2/common/environment.cpp +++ b/project2/common/environment.cpp @@ -1,14 +1,6 @@ #include <pch.hpp> #include "environment.h" #include "optionsSource.h" -#include "logger.h" -#include "scriptLoader.h" -#include <stdio.h> -#include <fstream> -#include <boost/filesystem/convenience.hpp> -#include <boost/tuple/tuple_comparison.hpp> -#include <boost/foreach.hpp> -#include <boost/bind.hpp> const Environment * Environment::currentEnv(NULL); @@ -44,32 +36,3 @@ Environment::getCurrent() return currentEnv; } -ScriptReaderPtr -Environment::resolveScript(const std::string & group, const std::string & name, bool ii) const -{ - typedef std::map<std::string, boost::shared_ptr<ScriptReaderLoader> > ReaderLoaders; - boost::filesystem::path e(name); - while (!e.empty()) { - ScriptKey sk(group, e.string()); - ScriptCache::const_iterator i = scriptCache.find(sk); - if (i != scriptCache.end() && i->second->isCurrent()) { - return i->second; - } - else { - BOOST_FOREACH(const ReaderLoaders::value_type & rl, *Plugable::objLoaders<ScriptReaderLoader>()) { - ScriptReaderPtr rs = rl.second->resolveScript(group, e.string()); - if (rs) { - return (scriptCache[sk] = rs); - } - } - } - e = e.parent_path(); - } - if (ii) { - throw DependencyNotFound(group, name); - } - else { - throw ScriptNotFound(group, name); - } -} - |