#ifndef MSP_INPUT_INPUTHUB_H_
#define MSP_INPUT_INPUTHUB_H_
-#include <map>
+#include <vector>
+#include <sigc++/trackable.h>
#include "device.h"
namespace Msp {
The Hub device collects events from multiple input devices and presents an
aggregate of them. Button and axis numbers are mapped to unique values.
*/
-class Hub: public Device
+class Hub: public Device, public sigc::trackable
{
protected:
- std::map<unsigned, Device *> devices;
+ std::vector<Device *> devices;
public:
Hub();
/// Attaches an input device to the hub.
void attach(Device &dev);
+ virtual Device *find_subdevice(DeviceType, unsigned = 0);
+ virtual Device *find_subdevice(const std::string &);
+
virtual std::string get_button_name(unsigned) const;
virtual std::string get_axis_name(unsigned) const;
protected: