]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/device.h
Use default member initializers and defaulted default constructors
[libs/gui.git] / source / input / device.h
index 853ec96c902ebe4cdf82942822fa10563ab69849..e80029054548fe82c0a985bb2690b23c6773021c 100644 (file)
@@ -14,7 +14,6 @@ class device_not_available: public std::runtime_error
 {
 public:
        device_not_available(const std::string &w): std::runtime_error(w) { }
-       virtual ~device_not_available() throw() { }
 };
 
 
@@ -58,7 +57,7 @@ public:
        sigc::signal<bool, unsigned, float, float>::accumulated<EventAccumulator> signal_axis_motion;
 
 protected:
-       DeviceType type;
+       DeviceType type = UNSPECIFIED;
        std::string name;
        std::vector<char> buttons;
        std::vector<float> axes;
@@ -69,6 +68,8 @@ public:
 
        DeviceType get_type() const { return type; }
        const std::string &get_name() const { return name; }
+       virtual Device *find_subdevice(DeviceType, unsigned = 0);
+       virtual Device *find_subdevice(const std::string &);
        bool get_button_state(unsigned) const;
        float get_axis_value(unsigned) const;