X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FResource.h;h=e75b87185dbec898bd88519401380373c6f47f72;hb=bbbe226ccc7086721ba5e652fa89e6e8190adb56;hp=253c09ee876097516df4793ae6fbb17f9b314ee0;hpb=6ea740cd0e76ed9da89a872d047342fafd733c32;p=chaz%2Fopenbox diff --git a/src/Resource.h b/src/Resource.h index 253c09ee..e75b8718 100644 --- a/src/Resource.h +++ b/src/Resource.h @@ -27,11 +27,11 @@ #include #include -class obResource { +class Resource { public: - obResource(const std::string &file); - obResource(); - virtual ~obResource(); + explicit Resource(const std::string &file); + Resource(); + virtual ~Resource(); inline const std::string &file() const { return static_cast(m_file); @@ -50,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); @@ -64,6 +66,7 @@ public: std::string &value) const; private: + static bool m_initialized; std::string m_file; bool m_modified; bool m_autosave;