X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdependencycache.h;h=4160cec3a41cf5f7fc0cd39ae64202c7d40988ab;hb=243d7c7355c1c5d9a0134440f340936325caaf88;hp=701c89ee304e22ff52513a26c5da7cb415246896;hpb=242c55b17e6608b29a77ca17a5b677e202a3ca90;p=builder.git diff --git a/source/dependencycache.h b/source/dependencycache.h index 701c89e..4160cec 100644 --- a/source/dependencycache.h +++ b/source/dependencycache.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of builder -Copyright © 2007, 2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef DEPENDENCYCACHE_H_ #define DEPENDENCYCACHE_H_ @@ -14,9 +7,10 @@ Distributed under the LGPL class Package; /** -Stores dependencies to avoid expensive 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. +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 { @@ -30,14 +24,15 @@ private: 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. */ + /** Saves the depencency cache. Does nothing if the cache is empty or + nothing has changed. */ void save() const; };