X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b12381fd076b83ab289dc38a14b701c4fbb76715..d5b7462f9c0fe95644ddbd117bacc4ef367cac9a:/stglibs/conffiles.lib/conffiles.h?ds=sidebyside diff --git a/stglibs/conffiles.lib/conffiles.h b/stglibs/conffiles.lib/conffiles.h index 943fd4c8..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; //--------------------------------------------------------------------------- @@ -49,7 +49,7 @@ public: ~CONFIGFILE(); const string & GetFileName() const; - // 5 ÆÕÎËÃÉÉ Read* ×ÏÚ×ÒÁÝÁÀÔ 0 ÐÒÉ ÕÓÐÅÛÎÏÍ ÓÞÉÔÙ×ÁÎÉÉ + // æÕÎËÃÉÉ Read* ×ÏÚ×ÒÁÝÁÀÔ 0 ÐÒÉ ÕÓÐÅÛÎÏÍ ÓÞÉÔÙ×ÁÎÉÉ // É EINVAL ÐÒÉ ÏÔÓÕÔÓ×ÉÉ ÐÁÒÁÍÅÔÒÁ É ×ÙÓÔÁ×ÌÑÀÔ defaulValue //int ReadString(const string & param, char * val, int * maxLen, const char * defaultVal) const; int ReadString(const string & param, string * val, const string & defaultVal) const; @@ -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