]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/hub.h
Use the override specifier where appropriate
[libs/gui.git] / source / input / hub.h
index 31eeb94bf5dfb220c793d73d6cff533b345204e5..1abff37a18cc52cc10b6fa20db170f79a91c3a3b 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef MSP_INPUT_INPUTHUB_H_
 #define MSP_INPUT_INPUTHUB_H_
 
-#include <map>
+#include <vector>
 #include <sigc++/trackable.h>
 #include "device.h"
 
@@ -15,7 +15,7 @@ aggregate of them.  Button and axis numbers are mapped to unique values.
 class Hub: public Device, public sigc::trackable
 {
 protected:
-       std::map<unsigned, Device *> devices;
+       std::vector<Device *> devices;
 
 public:
        Hub();
@@ -23,8 +23,11 @@ public:
        /// Attaches an input device to the hub.
        void attach(Device &dev);
 
-       virtual std::string get_button_name(unsigned) const;
-       virtual std::string get_axis_name(unsigned) const;
+       Device *find_subdevice(DeviceType, unsigned = 0) override;
+       Device *find_subdevice(const std::string &) override;
+
+       std::string get_button_name(unsigned) const override;
+       std::string get_axis_name(unsigned) const override;
 protected:
        void button_press(unsigned, unsigned);
        void button_release(unsigned, unsigned);