+/**
+Selects the last profile used. If the profile cache file is not present, the
+default profile is assumed.
+*/
+void Config::select_last_profile()
+{
+ ifstream in((source/".profile.cache").str().c_str());
+ if(in)
+ {
+ string profile;
+ in>>profile;
+ set_option("profile", profile);
+ }
+ else
+ set_option("profile", "default");
+
+ load();
+}
+
+/**
+Selects the given profile. The profile cache file is updated as well.
+*/
+void Config::select_profile(const string &profile)
+{
+ set_option("profile", profile);
+
+ ofstream out((source/".profile.cache").str().c_str());
+ if(out)
+ out<<profile<<'\n';
+
+ load();
+}
+
+/**
+Processes options from the given raw option map. Nonexistent options are
+ignored. If any options were changed, the mtime of the configuration is updated
+to the current time.
+
+@param opts A map to process options from
+
+@return Whether any option values were changed
+*/
+bool Config::update(const RawOptionMap &opts)