namespace Msp {
namespace Input {
+/**
+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
{
+protected:
+ std::vector<Device *> devices;
+
+public:
+ /**
+ Attaches an input device to the hub.
+
+ @param dev Device to attach
+
+ @return Index of the device within the hub
+ */
+ unsigned attach(Device &dev);
+protected:
+ void button_press(unsigned, unsigned);
+ void button_release(unsigned, unsigned);
+ void axis_motion(unsigned, float, float, unsigned);
};
} // namespace Input