{
return MODES_ERROR_NOT_SUPPORTED;
}
+ virtual int undo(const std::string &key, int val)
+ {
+ return MODES_ERROR_NOT_SUPPORTED;
+ }
+ virtual int undo(const std::string &key, double val)
+ {
+ return MODES_ERROR_NOT_SUPPORTED;
+ }
+ virtual int undo(const std::string &key, bool val)
+ {
+ return MODES_ERROR_NOT_SUPPORTED;
+ }
+ virtual int undo(const std::string &key, const std::string &val)
+ {
+ return MODES_ERROR_NOT_SUPPORTED;
+ }
virtual int getInt(const std::string &key)
{
{
return std::string();
}
-
private:
std::string name; /* plugin key */
};
typedef Plugin *create_t();
typedef void destroy_t(Plugin *);
-
}
int set(const std::string &key, bool val, bool *oldVal) override;
int set(const std::string &key, const std::string &val, std::string *oldVal) override;
+ int undo(const std::string &key, int val) override;
+ int undo(const std::string &key, double val) override;
+ int undo(const std::string &key, bool val) override;
+ int undo(const std::string &key, const std::string &val) override;
+
int getInt(const std::string &key) override;
double getDouble(const std::string &key) override;
bool getBool(const std::string &key) override;
return MODES_ERROR_NONE;
}
+int TestPlugin::undo(const std::string &key, int val)
+{
+ DBG("TestPlugin::undo int ( %s, %d )", key.c_str(), val);
+ return MODES_ERROR_NONE;
+}
+
+int TestPlugin::undo(const std::string &key, double val)
+{
+ DBG("TestPlugin::undo double ( %s, %lf )", key.c_str(), val);
+ return MODES_ERROR_NONE;
+}
+
+int TestPlugin::undo(const std::string &key, bool val)
+{
+ DBG("TestPlugin::undo bool ( %s, %s )", key.c_str(), val ? "true" : "false");
+ return MODES_ERROR_NONE;
+}
+
+int TestPlugin::undo(const std::string &key, const std::string &val)
+{
+ DBG("TestPlugin::undo string ( %s, %s )", key.c_str(), val.c_str());
+ return MODES_ERROR_NONE;
+}
+
int TestPlugin::getInt(const std::string &key)
{
DBG("TestPlugin::getInt(%s)", key.c_str());
DBG("TestPlugin::getString(%s)", key.c_str());
return std::string("test");
}
-