#include <X11/Xlib.h>
#include <X11/Xresource.h>
-class obResource {
+class Resource {
public:
- obResource(const std::string &file);
- obResource();
- virtual ~obResource();
+ explicit Resource(const std::string &file);
+ Resource();
+ virtual ~Resource();
- // an empty string will cause an assert if load() or save() is called
inline const std::string &file() const {
return static_cast<const std::string &>(m_file);
}
void save();
bool load();
+ void create();
void setValue(const std::string &rname, bool value);
+ void setValue(const std::string &rname, int value);
void setValue(const std::string &rname, long value);
void setValue(const std::string &rname, const std::string &value);
void setValue(const std::string &rname, const char *value);
std::string &value) const;
private:
+ static bool m_initialized;
std::string m_file;
bool m_modified;
bool m_autosave;