From: Mikko Rasa Date: Mon, 24 Jun 2013 10:20:00 +0000 (+0300) Subject: Force c'tors and d'tors of classes with external symbols into the library X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5627c06b70fe2e8e926ed8d1d2d3fff0a33a503f;p=libs%2Fgui.git Force c'tors and d'tors of classes with external symbols into the library --- diff --git a/source/input/binarycontrol.cpp b/source/input/binarycontrol.cpp index 57c6342..b0148cc 100644 --- a/source/input/binarycontrol.cpp +++ b/source/input/binarycontrol.cpp @@ -21,6 +21,9 @@ BinaryControl::BinaryControl(Device &d, ControlSrcType t, unsigned i): threshold(0.5) { } +BinaryControl::~BinaryControl() +{ } + void BinaryControl::set_threshold(float t) { threshold = t; diff --git a/source/input/binarycontrol.h b/source/input/binarycontrol.h index 8a156f7..64e4ab1 100644 --- a/source/input/binarycontrol.h +++ b/source/input/binarycontrol.h @@ -25,6 +25,7 @@ public: BinaryControl(); BinaryControl(const ControlSource &); BinaryControl(Device &, ControlSrcType, unsigned); + virtual ~BinaryControl(); /** Sets the threshold between states for axis sources. No effect on button sources */ diff --git a/source/input/control.cpp b/source/input/control.cpp index 18c2ffd..5060101 100644 --- a/source/input/control.cpp +++ b/source/input/control.cpp @@ -51,6 +51,9 @@ Control::Control(Device &d, ControlSrcType t, unsigned i): connect_signals(); } +Control::~Control() +{ } + void Control::capture(Device &d) { notify_callbacks(); diff --git a/source/input/control.h b/source/input/control.h index 924bbec..e567963 100644 --- a/source/input/control.h +++ b/source/input/control.h @@ -55,7 +55,7 @@ protected: Control(const ControlSource &); Control(Device &, ControlSrcType, unsigned); public: - virtual ~Control() { } + virtual ~Control(); void capture(Device &); void cancel_capture(); diff --git a/source/input/device.cpp b/source/input/device.cpp index 194e999..10f8d0c 100644 --- a/source/input/device.cpp +++ b/source/input/device.cpp @@ -4,6 +4,12 @@ namespace Msp { namespace Input { +Device::Device() +{ } + +Device::~Device() +{ } + bool Device::get_button_state(unsigned btn) const { if(btn>buttons.size()) diff --git a/source/input/device.h b/source/input/device.h index 6a436ab..e356bea 100644 --- a/source/input/device.h +++ b/source/input/device.h @@ -42,9 +42,10 @@ protected: std::vector buttons; std::vector axes; - Device() { } + Device(); public: - virtual ~Device() { } + virtual ~Device(); + const std::string &get_name() const { return name; } bool get_button_state(unsigned) const; float get_axis_value(unsigned) const; diff --git a/source/input/keyboard.cpp b/source/input/keyboard.cpp index 159e5ee..0a690d1 100644 --- a/source/input/keyboard.cpp +++ b/source/input/keyboard.cpp @@ -15,5 +15,8 @@ Keyboard::Keyboard(Graphics::Window &w): window.signal_input_event.connect(sigc::mem_fun(this, &Keyboard::input_event)); } +Keyboard::~Keyboard() +{ } + } // namespace Input } // namespace Msp diff --git a/source/input/keyboard.h b/source/input/keyboard.h index babdf9a..8cd83f2 100644 --- a/source/input/keyboard.h +++ b/source/input/keyboard.h @@ -22,6 +22,7 @@ private: public: Keyboard(Graphics::Window &); + virtual ~Keyboard(); virtual std::string get_button_name(unsigned) const; private: