Namespace FP8, FP16 to avoid symbol conflicts
authorRobin Gareus <robin@gareus.org>
Tue, 12 Dec 2017 13:09:40 +0000 (14:09 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 12 Dec 2017 13:09:40 +0000 (14:09 +0100)
13 files changed:
libs/surfaces/faderport8/actions.cc
libs/surfaces/faderport8/callbacks.cc
libs/surfaces/faderport8/faderport8.cc
libs/surfaces/faderport8/faderport8.h
libs/surfaces/faderport8/faderport8_interface.cc
libs/surfaces/faderport8/fp8_base.h
libs/surfaces/faderport8/fp8_button.h
libs/surfaces/faderport8/fp8_controls.cc
libs/surfaces/faderport8/fp8_controls.h
libs/surfaces/faderport8/fp8_strip.cc
libs/surfaces/faderport8/fp8_strip.h
libs/surfaces/faderport8/gui.cc
libs/surfaces/faderport8/gui.h

index 07496e991266bdc63a55670da049208dc9c7a853..b09fa32355974d6d1cfff939e8da5e2131e537dc 100644 (file)
 
 #include "pbd/i18n.h"
 
-using namespace ARDOUR;
-using namespace ArdourSurface;
 using namespace std;
-using namespace ArdourSurface::FP8Types;
+using namespace ARDOUR;
+using namespace ArdourSurface::FP_NAMESPACE;
+using namespace ArdourSurface::FP_NAMESPACE::FP8Types;
 
 #define BindMethod(ID, CB) \
        _ctrls.button (FP8Controls::ID).released.connect_same_thread (button_connections, boost::bind (&FaderPort8:: CB, this));
index fd5d1407cbae09cd61203fac138dc98843e6fd69..fe3cdfc28ec91dddda0061dbe20853f7c11db4fc 100644 (file)
@@ -30,8 +30,8 @@
 #include "pbd/i18n.h"
 
 using namespace ARDOUR;
-using namespace ArdourSurface;
-using namespace ArdourSurface::FP8Types;
+using namespace ArdourSurface::FP_NAMESPACE;
+using namespace ArdourSurface::FP_NAMESPACE::FP8Types;
 
 void
 FaderPort8::connect_session_signals ()
index bc48261c0acb6c8376c0652af67b924a6e90cdc6..94fe52b78c6a41fb202e9b9568dee3717b18519d 100644 (file)
 #include "faderport8.h"
 
 using namespace ARDOUR;
-using namespace ArdourSurface;
 using namespace PBD;
 using namespace Glib;
 using namespace std;
-using namespace ArdourSurface::FP8Types;
+using namespace ArdourSurface::FP_NAMESPACE;
+using namespace ArdourSurface::FP_NAMESPACE::FP8Types;
 
 #include "pbd/i18n.h"
 
index 30a3f10d18eef491932b74ebaca49aad197a05a5..1f5c25e3fd728e5462cc09e9175be8d15e4b6551 100644 (file)
@@ -53,7 +53,7 @@ namespace ARDOUR {
        class PluginInsert;
 }
 
-namespace ArdourSurface {
+namespace ArdourSurface { namespace FP_NAMESPACE {
 
 struct FaderPort8Request : public BaseUI::BaseRequestObject
 {
@@ -401,6 +401,6 @@ private:
        UserActionMap _user_action_map;
 };
 
-} /* namespace */
+} /* namespace */
 
 #endif /* ardour_surface_faderport8_h */
index c87751cf739e5647b3287d10f75a3fa8311cedcb..0075ca168a911f6714388c2363f49a30fc910c54 100644 (file)
@@ -23,7 +23,7 @@
 #include "faderport8.h"
 
 using namespace ARDOUR;
-using namespace ArdourSurface;
+using namespace ArdourSurface::FP_NAMESPACE;
 
 static ControlProtocol*
 new_faderport8_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s)
index 70f77798947e30e0e6a417ab843c3e2dd46ab475..a77b4a67f0a270bdc6eae3fdbbb9d888134d631c 100644 (file)
 
 #include "pbd/signals.h"
 
-namespace ArdourSurface {
+#ifdef FADERPORT16
+#define FP_NAMESPACE FP16
+#else
+#define FP_NAMESPACE FP8
+#endif
+
+namespace ArdourSurface { namespace FP_NAMESPACE {
 
 /* conveniece wrappers depending on "FP8Base& _base" */
 #define fp8_loop dynamic_cast<BaseUI*>(&_base)->main_loop
@@ -170,5 +176,5 @@ namespace FP8Types {
 
 };
 
-} /* namespace */
+} /* namespace */
 #endif /* _ardour_surfaces_fp8base_h_ */
index 4b27714cd199f20789884eda977d429f99a560f1..72b48d1070572f5f2444ba17c0f008d217ff3f59 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "fp8_base.h"
 
-namespace ArdourSurface {
+namespace ArdourSurface { namespace FP_NAMESPACE {
 
 /* virtual base-class and interface */
 class FP8ButtonInterface
@@ -505,5 +505,5 @@ private:
        sigc::connection _press_timeout_connection;
 };
 
-} /* namespace */
+} /* namespace */
 #endif /* _ardour_surfaces_fp8button_h_ */
index 6edbd556a0e8c78dc5045fb644a6614fbca7b81a..81c733ad55355f72b0e676d757cb76eb2b2a0de9 100644 (file)
@@ -20,8 +20,8 @@
 
 #include "fp8_controls.h"
 
-using namespace ArdourSurface;
-using namespace ArdourSurface::FP8Types;
+using namespace ArdourSurface::FP_NAMESPACE;
+using namespace ArdourSurface::FP_NAMESPACE::FP8Types;
 
 bool FP8ButtonInterface::force_change = false;
 
index 9b015bea54e26e83337fe4dc20b0d78455ed49c7..6cdc3b440d3bbd7ddbd7921d77605407032733f1 100644 (file)
@@ -25,7 +25,7 @@
 #include "fp8_button.h"
 #include "fp8_strip.h"
 
-namespace ArdourSurface {
+namespace ArdourSurface { namespace FP_NAMESPACE {
 
 class FP8Controls
 {
@@ -170,5 +170,5 @@ protected:
        PBD::ScopedConnectionList button_connections;
 };
 
-} /* namespace */
+} /* namespace */
 #endif /* _ardour_surfaces_fp8controls_h_ */
index 0aa64e1cb9069f55a09e4e5f9fdc32e42a7e4ea6..89eda56063102e3db60c5a95c62b8073c8fa1c69 100644 (file)
@@ -30,8 +30,8 @@
 #include "fp8_strip.h"
 
 using namespace ARDOUR;
-using namespace ArdourSurface;
-using namespace ArdourSurface::FP8Types;
+using namespace ArdourSurface::FP_NAMESPACE;
+using namespace ArdourSurface::FP_NAMESPACE::FP8Types;
 
 uint8_t /* static */
 FP8Strip::midi_ctrl_id (CtrlElement type, uint8_t id)
index c3fc749f9703a9d026df9df177e237a4b1378ecc..0c9f54b275bfd382a295d6430da287c3d6433e0b 100644 (file)
@@ -41,7 +41,7 @@ namespace ARDOUR {
        class ReadOnlyControl;
 }
 
-namespace ArdourSurface {
+namespace ArdourSurface { namespace FP_NAMESPACE {
 
 class FP8Strip
 {
@@ -189,5 +189,5 @@ private:
        std::string _last_line[4];
 };
 
-} /* namespace */
+} /* namespace */
 #endif /* _ardour_surfaces_fp8strip_h_ */
index b9543d12c61d6f2b5d7afaa7fd968ef1d9ab6da3..63bd72dd4621b7a04d097fad5baa0d64b45c449e 100644 (file)
 
 using namespace PBD;
 using namespace ARDOUR;
-using namespace ArdourSurface;
 using namespace std;
 using namespace Gtk;
 using namespace Gtkmm2ext;
+using namespace ArdourSurface::FP_NAMESPACE;
 
 void*
 FaderPort8::get_gui () const
index 58d8a2dfce0ae8b3ceb880e9921307bd70d4ffc2..5e9dfd648925506efb69bbba0e40f469840fbbb0 100644 (file)
@@ -37,7 +37,7 @@ namespace Gtk {
 
 #include "faderport8.h"
 
-namespace ArdourSurface {
+namespace ArdourSurface { namespace FP_NAMESPACE {
 
 class FP8GUI : public Gtk::VBox
 {
@@ -108,6 +108,6 @@ private:
        bool find_action_in_model (const Gtk::TreeModel::iterator& iter, std::string const & action_path, Gtk::TreeModel::iterator* found);
 };
 
-}
+} }
 
 #endif /* __ardour_faderport8_gui_h__ */