diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-05-20 04:31:18 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-05-20 04:31:18 (GMT) |
commit | 8a83e334abceda6f5c119872f922da7cc99c7210 (patch) | |
tree | bbe1f2e20fa599ebfad4f89aebd5e46905630ead /src/module.h | |
parent | 77a598ab7267d04f0b1fc0277e0314c3780313c0 (diff) |
try to refactor the 'is_modified( includefile )' code
Diffstat (limited to 'src/module.h')
-rw-r--r-- | src/module.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/module.h b/src/module.h index 9f46d37..fa255e1 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 @@ -90,9 +99,9 @@ public: 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; |