diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-05-27 05:08:31 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-05-27 05:08:31 (GMT) |
commit | 37dc9342a14206f5862447eb9d3d5049ec67f638 (patch) | |
tree | 17e5a57dfa154821918094cab47476189771ce00 /src/module.h | |
parent | 6742ad55f4cf335fc767ab65784aab81e06b61d0 (diff) | |
parent | 0967a26bff45951d7b86fe628e8b1156e6e40ede (diff) |
Merge branch 'master' of github.com:openscad/openscad into issue125
Diffstat (limited to 'src/module.h')
-rw-r--r-- | src/module.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/module.h b/src/module.h index 9f46d37..5dfb8c4 100644 --- a/src/module.h +++ b/src/module.h @@ -5,6 +5,9 @@ #include <vector> #include <list> #include <boost/unordered_map.hpp> +#include <time.h> +#include <sys/stat.h> + #include "value.h" #include "typedefs.h" #include "localscope.h" @@ -74,6 +77,12 @@ public: LocalScope scope; }; +struct IncludeFile { + std::string filename; + bool valid; + time_t mtime; +}; + // FIXME: A FileModule doesn't have definition arguments, so we shouldn't really // inherit from a Module class FileModule : public Module @@ -84,15 +93,15 @@ public: void setModulePath(const std::string &path) { this->path = path; } const std::string &modulePath() const { return this->path; } - void registerInclude(const std::string &filename); + void registerInclude(const std::string &localpath, const std::string &fullpath); bool handleDependencies(); virtual AbstractNode *instantiate(const Context *ctx, const ModuleInstantiation *inst, const EvalContext *evalctx = NULL) const; typedef boost::unordered_map<std::string, class FileModule*> ModuleContainer; ModuleContainer usedlibs; - typedef boost::unordered_map<std::string, time_t> IncludeContainer; + typedef boost::unordered_map<std::string, struct IncludeFile> IncludeContainer; IncludeContainer includes; - + bool include_modified(struct IncludeFile inc); private: bool is_handling_dependencies; std::string path; |