6 #include <msp/parser/loader.h>
7 #include <msp/path/path.h>
8 #include <msp/time/timestamp.h>
10 typedef std::map<std::string, std::string> RawOptionMap;
13 Manages configuration for a package. A configuration may have an arbitary
14 amount of options, as well as a modification time (mtime).
20 A single configuration option.
29 Option(const std::string &, const std::string &, const std::string &);
31 typedef std::map<std::string, Option> OptionMap;
33 void add_option(const std::string &, const std::string &, const std::string &);
34 const Option &get_option(const std::string &) const;
35 const OptionMap &get_options() const { return options; }
36 const Msp::Time::TimeStamp &get_mtime() const { return mtime; }
37 bool is_option(const std::string &) const;
38 bool process(const RawOptionMap &);
39 void load(const Msp::Path::Path &);
40 void save(const Msp::Path::Path &) const;
42 class Loader: public Msp::Parser::Loader
49 void option(const std::string &, const std::string &);
53 Msp::Time::TimeStamp mtime;