31#include "observable_confvar.h"
37std::istream& operator>>(std::istream& input, wxString& ws) {
56 std::istringstream iss;
57 config->SetPath(section);
58 auto value = config->Read(key,
"").ToStdString();
62 return iss.fail() ? default_val : r;
67 std::ostringstream oss;
70 wxLogWarning(
"Cannot dump failed buffer for key %s:%s", section.c_str(),
74 config->SetPath(section);
75 if (!config->Write(key.c_str(), oss.str().c_str())) {
76 wxLogWarning(
"Error writing buffer to key %s:%s", section.c_str(),
Wrapper for configuration variables which lives in a wxBaseConfig object.
const T Get(const T &default_val)
Get current value.
void Set(const T &arg)
Set value to given argument and notify listeners.
The observable notify/listen basic nuts and bolts.
virtual const void Notify()
Notify all listeners about variable change.