diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-19 21:52:01 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-26 21:45:03 (GMT) |
commit | 9a297ecee57549a4eb3919bde4f7b41a548724de (patch) | |
tree | b1f523e93f528559e9ada2d38d76be7a0362f9d4 /src/ModuleCache.h | |
parent | b4568a09df8be0f212ba1c4fd1660459900e3cf0 (diff) |
Refactoring: Split out FileModule from Module, Added LocalScope renamed some confusing 'evaluate' methods to 'instantiate', added FileContext (not yet used)
Diffstat (limited to 'src/ModuleCache.h')
-rw-r--r-- | src/ModuleCache.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ModuleCache.h b/src/ModuleCache.h index 1e6373d..b8ded38 100644 --- a/src/ModuleCache.h +++ b/src/ModuleCache.h @@ -1,11 +1,14 @@ #include <string> #include <boost/unordered_map.hpp> +/*! + Caches FileModules based on their filenames +*/ class ModuleCache { public: static ModuleCache *instance() { if (!inst) inst = new ModuleCache; return inst; } - class Module *evaluate(const std::string &filename); + class FileModule *evaluate(const std::string &filename); size_t size() { return this->entries.size(); } void clear(); @@ -16,7 +19,7 @@ private: static ModuleCache *inst; struct cache_entry { - class Module *module; + class FileModule *module; std::string cache_id; }; boost::unordered_map<std::string, cache_entry> entries; |