X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fconfig.h;h=ba23462c00e53a63196fcb0cb08fdae72fa40d2a;hb=654de39b62a9a58fd8e1b5a557361d628345788b;hp=e35743a3050e5ff1c4c979be8b5b9d5d2c57fcbf;hpb=b6dcf65b5e1b99f6c65454358c7610f3e9c8af2b;p=builder.git diff --git a/source/config.h b/source/config.h index e35743a..ba23462 100644 --- a/source/config.h +++ b/source/config.h @@ -1,14 +1,21 @@ +/* $Id$ + +This file is part of builder +Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #ifndef CONFIG_H_ #define CONFIG_H_ #include #include -#include +#include #include #include #include "misc.h" -class Package; +class SourcePackage; /** Manages configuration for a package. A configuration may have an arbitary @@ -31,7 +38,7 @@ public: }; typedef std::map OptionMap; - Config(Package &); + Config(SourcePackage &); void add_option(const std::string &, const std::string &, const std::string &); const Option &get_option(const std::string &) const; const OptionMap &get_options() const { return options; } @@ -43,17 +50,17 @@ public: void finish(); void save() const; private: - class Loader: public Msp::Parser::Loader + class Loader: public Msp::DataFile::Loader { public: Loader(Config &); private: Config &conf; - + void option(const std::string &, const std::string &); }; - Package &package; + SourcePackage &package; OptionMap options; Msp::Time::TimeStamp mtime; bool freeze_mtime;