X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FResource.h;h=e75b87185dbec898bd88519401380373c6f47f72;hb=89563281384c34886fb12b169d1bdf8d293f0b48;hp=da9a4d5cf4b6be01a75ce54d7030a50948d2005b;hpb=17ef2638592a4be20fb2b41e045c4ee51196271e;p=chaz%2Fopenbox diff --git a/src/Resource.h b/src/Resource.h index da9a4d5c..e75b8718 100644 --- a/src/Resource.h +++ b/src/Resource.h @@ -27,13 +27,12 @@ #include #include -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(m_file); } @@ -51,8 +50,10 @@ public: 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); @@ -65,6 +66,7 @@ public: std::string &value) const; private: + static bool m_initialized; std::string m_file; bool m_modified; bool m_autosave;