4 #ifndef _PROFILEMANAGER_H_ 5 #define _PROFILEMANAGER_H_ 9 #include "rapidxml/rapidxml.hpp" 10 #include "rapidxml/rapidxml_utils.hpp" 24 = std::string(
"~/.config/hopfskipjump.xml"));
40 rapidxml::xml_node<>*
exists(
const std::string& name)
const;
50 void saveProfile(
const std::string& name,
const std::string& profile);
58 std::string
getProfile(
const std::string& name)
const;
68 rapidxml::xml_node<>& out,
69 rapidxml::xml_document<>& mem);
void deep_copy_names_values(rapidxml::xml_node<> &in, rapidxml::xml_node<> &out, rapidxml::xml_document<> &mem)
Recursively clone a node and its values.
std::string getProfile(const std::string &name) const
Get an XML representation of a profile which can be used by fromXML()
static const char protocol[]
Protocol version in use by this release.
rapidxml::xml_document profiles
XML doc of known configurations.
rapidxml::xml_node * exists(const std::string &name) const
Determine whether the name profile exists in the database.
void saveProfile(const std::string &name, const std::string &profile)
Save a serialised profile under a given name, possibly overwriting an existing profile.
ProfileManager(std::string config=std::string("~/.config/hopfskipjump.xml"))
Create a profile manager to save and restore properties of DetectorBanks.
rapidxml::file * configXML
Known configurations.
std::string configPath
Path of the configuration file.
bool profilesModified
Document tree has been modified.
~ProfileManager()
Destroy this profile manager, rewriting the configuration file if any new profiles have been added...