summaryrefslogtreecommitdiffstats
path: root/src/RemoteControl.h
diff options
context:
space:
mode:
authorMatthias P. Braendli (think) <matthias@mpb.li>2012-08-16 18:05:40 +0200
committerMatthias P. Braendli (think) <matthias@mpb.li>2012-08-16 18:05:40 +0200
commitb946ff6bceef6150f19da0a86950ed9ebbf0c2cb (patch)
tree6987a458cdb324a0155f7f8d36fc1ecc0d336bb3 /src/RemoteControl.h
parent521ee81560be5d065bd090002a2c6b92a322a034 (diff)
downloaddabmod-b946ff6bceef6150f19da0a86950ed9ebbf0c2cb.tar.gz
dabmod-b946ff6bceef6150f19da0a86950ed9ebbf0c2cb.tar.bz2
dabmod-b946ff6bceef6150f19da0a86950ed9ebbf0c2cb.zip
crc-dabmod: removed useless set_parameters from remote_control
Diffstat (limited to 'src/RemoteControl.h')
-rw-r--r--src/RemoteControl.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/RemoteControl.h b/src/RemoteControl.h
index 2830210..53fc912 100644
--- a/src/RemoteControl.h
+++ b/src/RemoteControl.h
@@ -40,7 +40,7 @@
#include <stdexcept>
-#define ADD_PARAMETER(p, desc) { \
+#define RC_ADD_PARAMETER(p, desc) { \
vector<string> p; \
p.push_back(#p); \
p.push_back(desc); \
@@ -81,7 +81,7 @@ class RemoteControllable {
* It might be used in the commands the user has to type, so keep
* it short
*/
- virtual std::string get_rc_name() = 0;
+ virtual std::string get_rc_name() { return name_; }
/* Tell the controllable to enrol at the given controller */
virtual void enrol_at(BaseRemoteController& controller) {
@@ -99,15 +99,13 @@ class RemoteControllable {
}
/* Return a mapping of the descriptions of all parameters */
- virtual std::list< std::vector<std::string> > get_parameter_descriptions() = 0;
+ virtual std::list< std::vector<std::string> > get_parameter_descriptions() {
+ return parameters_;
+ }
/* Base function to set parameters. */
virtual void set_parameter(string parameter, string value) = 0;
- /* Convenience functions for other common types */
- virtual void set_parameter(string parameter, double value) = 0;
- virtual void set_parameter(string parameter, long value) = 0;
-
/* Getting a parameter always returns a string. */
virtual string get_parameter(string parameter) = 0;