diff --git a/JSONFile.h b/JSONFile.h index 2d1eef8..3f7c112 100644 --- a/JSONFile.h +++ b/JSONFile.h @@ -19,12 +19,12 @@ namespace coreutils { JSONFile(ZString path): JString(), File(path, O_RDWR, 0644) { } - + virtual ~JSONFile() { write(*this); } - + void changed(ZString key, ZString value) overide; }; diff --git a/JString.cpp b/JString.cpp index f13a080..de91bc8 100644 --- a/JString.cpp +++ b/JString.cpp @@ -216,5 +216,7 @@ namespace coreutils { } return output; } - + + void JString::changed(ZString key, ZString value) {} + } diff --git a/JString.h b/JString.h index 3897af6..0890c0d 100644 --- a/JString.h +++ b/JString.h @@ -69,6 +69,7 @@ namespace coreutils { Proxy& operator=(coreutils::MString value) { jstring.set(key, value); + jstring.changed(key, value); return *this; } @@ -84,6 +85,8 @@ namespace coreutils { JString & operator=(coreutils:: ZString value); MString pretty(); + + virtual void changed(ZString key, ZString value); private: void removeWhitespace(); diff --git a/testing/jstring_test b/testing/jstring_test index 92a2946..f131c2b 100755 Binary files a/testing/jstring_test and b/testing/jstring_test differ