X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5762481e5e9ca0f9418177f19dfe7d87bfab9c83..bc4721533e4041a19b42cb247064f9f42c3f9d5f:/stglibs/conffiles.lib/conffiles.h diff --git a/stglibs/conffiles.lib/conffiles.h b/stglibs/conffiles.lib/conffiles.h index 04e35a3a..6909c6c9 100644 --- a/stglibs/conffiles.lib/conffiles.h +++ b/stglibs/conffiles.lib/conffiles.h @@ -35,7 +35,7 @@ #include #include -#include "os_int.h" +#include "stg/os_int.h" using namespace std; //--------------------------------------------------------------------------- @@ -64,19 +64,21 @@ public: int ReadULongLongInt(const string & param, uint64_t *, uint64_t) const; int ReadDouble(const string & param, double * val, double defaultVal) const; - int WriteString(const string & param, const char * val) { return WriteString(param, std::string(val)); } - int WriteString(const string & param, const string & val); - int WriteInt(const string & param, int64_t val); - int WriteDouble(const string & param, double val); + void WriteString(const string & param, const char * val) { return WriteString(param, std::string(val)); } + void WriteString(const string & param, const string & val); + void WriteInt(const string & param, int64_t val); + void WriteDouble(const string & param, double val); - int Error(); + int Error() const; + int Flush() const; private: - int Flush(); - map param_val; string fileName; - int error; + mutable int error; + mutable bool changed; + + int Flush(const std::string & path) const; }; //--------------------------------------------------------------------------- #endif