X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fdependencycache.h;fp=source%2Fdependencycache.h;h=0000000000000000000000000000000000000000;hb=7bf0b5d013b88b0408031e2d6594357e71c8138f;hp=4160cec3a41cf5f7fc0cd39ae64202c7d40988ab;hpb=de7ca0d3ce73bfa3f870c4257dbf71e621224876;p=builder.git diff --git a/source/dependencycache.h b/source/dependencycache.h deleted file mode 100644 index 4160cec..0000000 --- a/source/dependencycache.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef DEPENDENCYCACHE_H_ -#define DEPENDENCYCACHE_H_ - -#include -#include "misc.h" - -class Package; - -/** -Stores dependencies to avoid expensive filesystem operations during DAG -building phase. The dependencies are stored in a map with target name as key -and a list of strings as value. The targets are free to store whatever they -want here. -*/ -class DependencyCache -{ -private: - typedef std::map DepsMap; - - SourcePackage &package; - DepsMap deps; - Msp::Time::TimeStamp mtime; - bool changed; - -public: - DependencyCache(SourcePackage &p); - - void set_deps(const std::string &tgt, const StringList &d); - bool has_deps(const std::string &tgt) const; - const StringList &get_deps(const std::string &tgt) const; - const Msp::Time::TimeStamp &get_mtime() const { return mtime; } - void load(); - - /** Saves the depencency cache. Does nothing if the cache is empty or - nothing has changed. */ - void save() const; -}; - -#endif