X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fhub.h;h=8d41bcee41393bc0314825db0c44b1fc2b65fc61;hb=051149e5026ff64f3ec477cf19080124b82de619;hp=af4db47d81da96538482ce0fe62c965b71cee323;hpb=c9626e6953c16efc66575eff80c4c0de2f739041;p=libs%2Fgui.git diff --git a/source/input/hub.h b/source/input/hub.h index af4db47..8d41bce 100644 --- a/source/input/hub.h +++ b/source/input/hub.h @@ -1,6 +1,7 @@ -#ifndef MSP_GBASE_INPUTHUB_H_ -#define MSP_GBASE_INPUTHUB_H_ +#ifndef MSP_INPUT_INPUTHUB_H_ +#define MSP_INPUT_INPUTHUB_H_ +#include #include "device.h" namespace Msp { @@ -13,19 +14,13 @@ aggregate of them. Button and axis numbers are mapped to unique values. class Hub: public Device { protected: - std::vector devices; + std::map devices; public: Hub(); - /** - Attaches an input device to the hub. - - @param dev Device to attach - - @return Index of the device within the hub - */ - unsigned attach(Device &dev); + /// 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;