summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-12-12 14:09:40 +0100
committerRobin Gareus <robin@gareus.org>2017-12-12 14:09:40 +0100
commit7671a0f6753a69737a0f27268d7a8b8570b8c991 (patch)
treeba489c9b279092106c190e8433236d9e9c6bd803 /libs
parente3340cdf0197ef326536b24102d076e9399f48c3 (diff)
Namespace FP8, FP16 to avoid symbol conflicts
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/faderport8/actions.cc6
-rw-r--r--libs/surfaces/faderport8/callbacks.cc4
-rw-r--r--libs/surfaces/faderport8/faderport8.cc4
-rw-r--r--libs/surfaces/faderport8/faderport8.h4
-rw-r--r--libs/surfaces/faderport8/faderport8_interface.cc2
-rw-r--r--libs/surfaces/faderport8/fp8_base.h10
-rw-r--r--libs/surfaces/faderport8/fp8_button.h4
-rw-r--r--libs/surfaces/faderport8/fp8_controls.cc4
-rw-r--r--libs/surfaces/faderport8/fp8_controls.h4
-rw-r--r--libs/surfaces/faderport8/fp8_strip.cc4
-rw-r--r--libs/surfaces/faderport8/fp8_strip.h4
-rw-r--r--libs/surfaces/faderport8/gui.cc2
-rw-r--r--libs/surfaces/faderport8/gui.h4
13 files changed, 31 insertions, 25 deletions
diff --git a/libs/surfaces/faderport8/actions.cc b/libs/surfaces/faderport8/actions.cc
index 07496e9912..b09fa32355 100644
--- a/libs/surfaces/faderport8/actions.cc
+++ b/libs/surfaces/faderport8/actions.cc
@@ -31,10 +31,10 @@
#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));
diff --git a/libs/surfaces/faderport8/callbacks.cc b/libs/surfaces/faderport8/callbacks.cc
index fd5d1407cb..fe3cdfc28e 100644
--- a/libs/surfaces/faderport8/callbacks.cc
+++ b/libs/surfaces/faderport8/callbacks.cc
@@ -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 ()
diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc
index bc48261c0a..94fe52b78c 100644
--- a/libs/surfaces/faderport8/faderport8.cc
+++ b/libs/surfaces/faderport8/faderport8.cc
@@ -50,11 +50,11 @@
#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"
diff --git a/libs/surfaces/faderport8/faderport8.h b/libs/surfaces/faderport8/faderport8.h
index 30a3f10d18..1f5c25e3fd 100644
--- a/libs/surfaces/faderport8/faderport8.h
+++ b/libs/surfaces/faderport8/faderport8.h
@@ -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 */
diff --git a/libs/surfaces/faderport8/faderport8_interface.cc b/libs/surfaces/faderport8/faderport8_interface.cc
index c87751cf73..0075ca168a 100644
--- a/libs/surfaces/faderport8/faderport8_interface.cc
+++ b/libs/surfaces/faderport8/faderport8_interface.cc
@@ -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)
diff --git a/libs/surfaces/faderport8/fp8_base.h b/libs/surfaces/faderport8/fp8_base.h
index 70f7779894..a77b4a67f0 100644
--- a/libs/surfaces/faderport8/fp8_base.h
+++ b/libs/surfaces/faderport8/fp8_base.h
@@ -24,7 +24,13 @@
#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_ */
diff --git a/libs/surfaces/faderport8/fp8_button.h b/libs/surfaces/faderport8/fp8_button.h
index 4b27714cd1..72b48d1070 100644
--- a/libs/surfaces/faderport8/fp8_button.h
+++ b/libs/surfaces/faderport8/fp8_button.h
@@ -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_ */
diff --git a/libs/surfaces/faderport8/fp8_controls.cc b/libs/surfaces/faderport8/fp8_controls.cc
index 6edbd556a0..81c733ad55 100644
--- a/libs/surfaces/faderport8/fp8_controls.cc
+++ b/libs/surfaces/faderport8/fp8_controls.cc
@@ -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;
diff --git a/libs/surfaces/faderport8/fp8_controls.h b/libs/surfaces/faderport8/fp8_controls.h
index 9b015bea54..6cdc3b440d 100644
--- a/libs/surfaces/faderport8/fp8_controls.h
+++ b/libs/surfaces/faderport8/fp8_controls.h
@@ -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_ */
diff --git a/libs/surfaces/faderport8/fp8_strip.cc b/libs/surfaces/faderport8/fp8_strip.cc
index 0aa64e1cb9..89eda56063 100644
--- a/libs/surfaces/faderport8/fp8_strip.cc
+++ b/libs/surfaces/faderport8/fp8_strip.cc
@@ -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)
diff --git a/libs/surfaces/faderport8/fp8_strip.h b/libs/surfaces/faderport8/fp8_strip.h
index c3fc749f97..0c9f54b275 100644
--- a/libs/surfaces/faderport8/fp8_strip.h
+++ b/libs/surfaces/faderport8/fp8_strip.h
@@ -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_ */
diff --git a/libs/surfaces/faderport8/gui.cc b/libs/surfaces/faderport8/gui.cc
index b9543d12c6..63bd72dd46 100644
--- a/libs/surfaces/faderport8/gui.cc
+++ b/libs/surfaces/faderport8/gui.cc
@@ -41,10 +41,10 @@
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
diff --git a/libs/surfaces/faderport8/gui.h b/libs/surfaces/faderport8/gui.h
index 58d8a2dfce..5e9dfd6489 100644
--- a/libs/surfaces/faderport8/gui.h
+++ b/libs/surfaces/faderport8/gui.h
@@ -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__ */