]> git.tdb.fi Git - builder.git/blobdiff - source/config.h
Better encapsulation of config inside Package
[builder.git] / source / config.h
index 355108fb2c35bcd26f5c012c107dc4d587703212..2767f8263a827a67693ee18376d605e842077530 100644 (file)
@@ -35,9 +35,11 @@ public:
        const OptionMap &get_options() const          { return options; }
        const Msp::Time::TimeStamp &get_mtime() const { return mtime; }
        bool is_option(const std::string &) const;
-       bool process(const RawOptionMap &);
-       void load(const Msp::Path::Path &); 
-       void save(const Msp::Path::Path &) const;
+       void select_last_profile();
+       void select_profile(const std::string &);
+       bool update(const RawOptionMap &);
+       void set_source(const Msp::Path::Path &s)     { source=s; }
+       void save() const;
 private:
        class Loader: public Msp::Parser::Loader
        {
@@ -49,8 +51,12 @@ private:
                void option(const std::string &, const std::string &);
        };
        
-       OptionMap options;
+       Msp::Path::Path source;
+       OptionMap       options;
        Msp::Time::TimeStamp mtime;
+
+       bool set_option(const std::string &, const std::string &);
+       void load();
 };
 
 #endif