added changed event handler.
This commit is contained in:
parent
7eb2417456
commit
10df4a6a99
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
@ -216,5 +216,7 @@ namespace coreutils {
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
void JString::changed(ZString key, ZString value) {}
|
||||
|
||||
}
|
||||
|
@ -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();
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user