X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5762481e5e9ca0f9418177f19dfe7d87bfab9c83..941e7e46e15c1d0b168606ac218dc9cf2e6f7b92:/stglibs/conffiles.lib/conffiles.h diff --git a/stglibs/conffiles.lib/conffiles.h b/stglibs/conffiles.lib/conffiles.h index 04e35a3a..ae2c8fd0 100644 --- a/stglibs/conffiles.lib/conffiles.h +++ b/stglibs/conffiles.lib/conffiles.h @@ -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