-/* $Id$
-
-This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#ifndef MSP_GBASE_INPUTHUB_H_
-#define MSP_GBASE_INPUTHUB_H_
+#ifndef MSP_INPUT_INPUTHUB_H_
+#define MSP_INPUT_INPUTHUB_H_
+#include <map>
#include "device.h"
namespace Msp {
class Hub: public Device
{
protected:
- std::vector<Device *> devices;
+ std::map<unsigned, Device *> 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;