]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/device.cpp
Include the matching header first in .cpp files
[libs/gui.git] / source / input / device.cpp
index 452af22543e4f57db85a9a5271dad5c2648c96a1..87102f6513453e84a07bf362e8513e35c032c5ea 100644 (file)
@@ -1,5 +1,7 @@
-#include <msp/strings/format.h>
 #include "device.h"
+#include <msp/strings/format.h>
+
+using namespace std;
 
 namespace Msp {
 namespace Input {
@@ -11,6 +13,16 @@ Device::Device(DeviceType t):
 Device::~Device()
 { }
 
+Device *Device::find_subdevice(const string &n)
+{
+       return (n==name ? this : 0);
+}
+
+Device *Device::find_subdevice(DeviceType t, unsigned i)
+{
+       return (t==type && i==0 ? this : 0);
+}
+
 bool Device::get_button_state(unsigned btn) const
 {
        if(btn>=buttons.size())