X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdependencycache.h;h=701c89ee304e22ff52513a26c5da7cb415246896;hb=242c55b17e6608b29a77ca17a5b677e202a3ca90;hp=f182f31c1a017e6e1f6fe58fcd6ba6929cc0eff1;hpb=77461a8c0e2b5686b04cf15f3a9333b215813992;p=builder.git diff --git a/source/dependencycache.h b/source/dependencycache.h index f182f31..701c89e 100644 --- a/source/dependencycache.h +++ b/source/dependencycache.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions +Copyright © 2007, 2009 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -20,13 +20,6 @@ strings as value. The targets are free to store whatever they want here. */ class DependencyCache { -public: - DependencyCache(SourcePackage &p); - void set_deps(const std::string &tgt, const StringList &d); - const StringList &get_deps(const std::string &tgt) const; - const Msp::Time::TimeStamp &get_mtime() const { return mtime; } - void load(); - void save() const; private: typedef std::map DepsMap; @@ -34,6 +27,18 @@ private: DepsMap deps; Msp::Time::TimeStamp mtime; bool changed; + +public: + DependencyCache(SourcePackage &p); + void set_deps(const std::string &tgt, const StringList &d); + 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