From c5115c9a3c8ce6639f37e0b429e0498bb522d913 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 16 Oct 2013 23:30:28 -0400 Subject: [PATCH 01/36] add export visibility control to libpbd (works thus far on linux/gcc) --- libs/pbd/pbd/abstract_ui.h | 1 + libs/pbd/pbd/base_ui.h | 3 +- libs/pbd/pbd/basename.h | 4 +- libs/pbd/pbd/boost_debug.h | 8 ++-- libs/pbd/pbd/cartesian.h | 14 ++++--- libs/pbd/pbd/clear_dir.h | 4 +- libs/pbd/pbd/command.h | 3 +- libs/pbd/pbd/compose.h | 34 ++++++++------- libs/pbd/pbd/controllable.h | 5 ++- libs/pbd/pbd/controllable_descriptor.h | 4 +- libs/pbd/pbd/convert.h | 29 ++++++------- libs/pbd/pbd/cpus.h | 4 +- libs/pbd/pbd/crossthread.h | 4 +- libs/pbd/pbd/debug.h | 26 ++++++------ libs/pbd/pbd/debug_rt_alloc.h | 8 ++-- libs/pbd/pbd/demangle.h | 4 +- libs/pbd/pbd/destructible.h | 3 +- libs/pbd/pbd/enumwriter.h | 6 ++- libs/pbd/pbd/epa.h | 4 +- libs/pbd/pbd/error.h | 9 ++-- libs/pbd/pbd/event_loop.h | 4 +- libs/pbd/pbd/failed_constructor.h | 4 +- libs/pbd/pbd/fastlog.h | 10 +++-- libs/pbd/pbd/file_manager.h | 12 +++--- libs/pbd/pbd/floating.h | 6 ++- libs/pbd/pbd/forkexec.h | 6 ++- libs/pbd/pbd/fpu.h | 5 ++- libs/pbd/pbd/functor_command.h | 3 +- libs/pbd/pbd/id.h | 7 +++- libs/pbd/pbd/libpbd_visibility.h | 58 ++++++++++++++++++++++++++ libs/pbd/pbd/locale_guard.h | 4 +- libs/pbd/pbd/malign.h | 4 +- libs/pbd/pbd/memento_command.h | 7 ++-- libs/pbd/pbd/mountpoint.h | 4 +- libs/pbd/pbd/openuri.h | 6 ++- libs/pbd/pbd/pathexpand.h | 6 ++- libs/pbd/pbd/pathscanner.h | 4 +- libs/pbd/pbd/pbd.h | 6 ++- libs/pbd/pbd/pool.h | 13 +++--- libs/pbd/pbd/properties.h | 13 +++--- libs/pbd/pbd/property_basics.h | 11 ++--- libs/pbd/pbd/property_list.h | 5 ++- libs/pbd/pbd/pthread_utils.h | 19 +++++---- libs/pbd/pbd/rcu.h | 8 ++-- libs/pbd/pbd/receiver.h | 3 +- libs/pbd/pbd/replace_all.h | 4 +- libs/pbd/pbd/ringbuffer.h | 12 +++--- libs/pbd/pbd/ringbufferNPT.h | 12 +++--- libs/pbd/pbd/search_path.h | 4 +- libs/pbd/pbd/selectable.h | 8 ++-- libs/pbd/pbd/semaphore.h | 3 +- libs/pbd/pbd/semutils.h | 4 +- libs/pbd/pbd/sequence_property.h | 3 +- libs/pbd/pbd/shortpath.h | 4 +- libs/pbd/pbd/signals.h | 13 +++--- libs/pbd/pbd/sndfile_manager.h | 4 +- libs/pbd/pbd/stacktrace.h | 13 +++--- libs/pbd/pbd/stateful.h | 9 ++-- libs/pbd/pbd/stateful_diff_command.h | 8 ++-- libs/pbd/pbd/statefuldestructible.h | 3 +- libs/pbd/pbd/stl_delete.h | 11 ++--- libs/pbd/pbd/stl_functors.h | 16 +++---- libs/pbd/pbd/strsplit.h | 6 ++- libs/pbd/pbd/textreceiver.h | 3 +- libs/pbd/pbd/thrown_error.h | 3 +- libs/pbd/pbd/tokenizer.h | 3 +- libs/pbd/pbd/touchable.h | 10 +++-- libs/pbd/pbd/transmitter.h | 6 ++- libs/pbd/pbd/undo.h | 5 ++- libs/pbd/pbd/unknown_type.h | 4 +- libs/pbd/pbd/unwind.h | 4 +- libs/pbd/pbd/uuid.h | 4 +- libs/pbd/pbd/uuid_boost.h | 4 +- libs/pbd/pbd/whitespace.h | 4 +- libs/pbd/pbd/xml++.h | 14 ++++--- libs/pbd/wscript | 7 +++- 76 files changed, 400 insertions(+), 213 deletions(-) create mode 100644 libs/pbd/pbd/libpbd_visibility.h diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index fb09dee5c2..e78cf1ce28 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -26,6 +26,7 @@ #include +#include "pbd/libpbd_visibility.h" #include "pbd/receiver.h" #include "pbd/ringbufferNPT.h" #include "pbd/signals.h" diff --git a/libs/pbd/pbd/base_ui.h b/libs/pbd/pbd/base_ui.h index 186a3c55a6..ee2bbf5ee9 100644 --- a/libs/pbd/pbd/base_ui.h +++ b/libs/pbd/pbd/base_ui.h @@ -29,6 +29,7 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/crossthread.h" #include "pbd/event_loop.h" @@ -41,7 +42,7 @@ */ -class BaseUI : public sigc::trackable, public PBD::EventLoop +class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop { public: BaseUI (const std::string& name); diff --git a/libs/pbd/pbd/basename.h b/libs/pbd/pbd/basename.h index 43da3b39f6..16e7905748 100644 --- a/libs/pbd/pbd/basename.h +++ b/libs/pbd/pbd/basename.h @@ -22,8 +22,10 @@ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { - Glib::ustring basename_nosuffix (Glib::ustring); + LIBPBD_API Glib::ustring basename_nosuffix (Glib::ustring); } #endif /* __libpbd_basename_h__ */ diff --git a/libs/pbd/pbd/boost_debug.h b/libs/pbd/pbd/boost_debug.h index 6a0e4970fd..294a3468f6 100644 --- a/libs/pbd/pbd/boost_debug.h +++ b/libs/pbd/pbd/boost_debug.h @@ -23,8 +23,10 @@ #include -void boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type); -void boost_debug_list_ptrs (); -void boost_debug_shared_ptr_show_live_debugging (bool yn); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API void boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type); +LIBPBD_API void boost_debug_list_ptrs (); +LIBPBD_API void boost_debug_shared_ptr_show_live_debugging (bool yn); #endif /* __pbd_boost_debug_h__ */ diff --git a/libs/pbd/pbd/cartesian.h b/libs/pbd/pbd/cartesian.h index ffc91c2fd6..20c8b27088 100644 --- a/libs/pbd/pbd/cartesian.h +++ b/libs/pbd/pbd/cartesian.h @@ -22,14 +22,16 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -void spherical_to_cartesian (double azi, double ele, double len, double& x, double& y, double& z); -void cartesian_to_spherical (double x, double y, double z, double& azi, double& ele, double& len); +LIBPBD_API void spherical_to_cartesian (double azi, double ele, double len, double& x, double& y, double& z); +LIBPBD_API void cartesian_to_spherical (double x, double y, double z, double& azi, double& ele, double& len); struct AngularVector; -struct CartesianVector { +struct LIBPBD_API CartesianVector { double x; double y; double z; @@ -51,10 +53,10 @@ struct CartesianVector { return other; } - void angular (AngularVector&) const; + inline void angular (AngularVector& a) const; }; -struct AngularVector { +struct LIBPBD_API AngularVector { double azi; double ele; double length; @@ -95,7 +97,7 @@ struct AngularVector { } }; -inline void CartesianVector::angular (AngularVector& a) const { +LIBPBD_API inline void CartesianVector::angular (AngularVector& a) const { cartesian_to_spherical (x, y, z, a.azi, a.ele, a.length); } diff --git a/libs/pbd/pbd/clear_dir.h b/libs/pbd/pbd/clear_dir.h index 9c128d994d..c0fb49d41d 100644 --- a/libs/pbd/pbd/clear_dir.h +++ b/libs/pbd/pbd/clear_dir.h @@ -24,8 +24,10 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { - int clear_directory (const std::string&, size_t* = 0, std::vector* = 0); + LIBPBD_API int clear_directory (const std::string&, size_t* = 0, std::vector* = 0); } #endif /* __pbd_clear_dir_h__ */ diff --git a/libs/pbd/pbd/command.h b/libs/pbd/pbd/command.h index db4d2bbd81..4547b779fb 100644 --- a/libs/pbd/pbd/command.h +++ b/libs/pbd/pbd/command.h @@ -24,10 +24,11 @@ #include +#include "pbd/libpbd_visibility.h" #include "pbd/signals.h" #include "pbd/statefuldestructible.h" -class Command : public PBD::StatefulDestructible, public PBD::ScopedConnectionList +class LIBPBD_API Command : public PBD::StatefulDestructible, public PBD::ScopedConnectionList { public: virtual ~Command() { /* NOTE: derived classes must call drop_references() */ } diff --git a/libs/pbd/pbd/compose.h b/libs/pbd/pbd/compose.h index 0df9519aaf..a80cb213b2 100644 --- a/libs/pbd/pbd/compose.h +++ b/libs/pbd/pbd/compose.h @@ -38,11 +38,13 @@ #include #include // for multimap +#include "pbd/libpbd_visibility.h" + namespace StringPrivate { // the actual composition class - using string::compose is cleaner, so we // hide it here - class Composition + class LIBPBD_API Composition { public: // initialize and prepare format string on the form "text %1 text %2 etc." @@ -202,7 +204,7 @@ namespace StringPrivate // a series of functions which accept a format string on the form "text %1 // more %2 less %3" and a number of templated parameters and spits out the // composited string - template + template LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1) { StringPrivate::Composition c(fmt); @@ -210,7 +212,7 @@ namespace StringPrivate return c.str(); } - template + template LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2) { @@ -219,7 +221,7 @@ namespace StringPrivate return c.str(); } - template + template LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3) { @@ -228,7 +230,7 @@ namespace StringPrivate return c.str(); } - template + template LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4) @@ -238,7 +240,7 @@ namespace StringPrivate return c.str(); } - template + template LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5) @@ -249,7 +251,7 @@ namespace StringPrivate } template + typename T6> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6) @@ -260,7 +262,7 @@ namespace StringPrivate } template + typename T6, typename T7> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -272,7 +274,7 @@ namespace StringPrivate } template + typename T6, typename T7, typename T8> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -284,7 +286,7 @@ namespace StringPrivate } template + typename T6, typename T7, typename T8, typename T9> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -296,7 +298,7 @@ namespace StringPrivate } template + typename T6, typename T7, typename T8, typename T9, typename T10> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -311,7 +313,7 @@ namespace StringPrivate template + typename T11> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -326,7 +328,7 @@ namespace StringPrivate template + typename T11, typename T12> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -341,7 +343,7 @@ namespace StringPrivate template + typename T11, typename T12, typename T13> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -357,7 +359,7 @@ namespace StringPrivate template + typename T11, typename T12, typename T13, typename T14> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, @@ -374,7 +376,7 @@ namespace StringPrivate template + typename T15> LIBPBD_API inline std::string string_compose(const std::string &fmt, const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const T5 &o5, const T6 &o6, diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h index d9cd21d28d..eb4b7ff142 100644 --- a/libs/pbd/pbd/controllable.h +++ b/libs/pbd/pbd/controllable.h @@ -24,6 +24,7 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/signals.h" #include @@ -33,7 +34,7 @@ class XMLNode; namespace PBD { -class Controllable : public PBD::StatefulDestructible { +class LIBPBD_API Controllable : public PBD::StatefulDestructible { public: enum Flag { Toggle = 0x1, @@ -113,7 +114,7 @@ class Controllable : public PBD::StatefulDestructible { a Controllable */ -class IgnorableControllable : public Controllable +class LIBPBD_API IgnorableControllable : public Controllable { public: IgnorableControllable () : PBD::Controllable ("ignoreMe") {} diff --git a/libs/pbd/pbd/controllable_descriptor.h b/libs/pbd/pbd/controllable_descriptor.h index 6b0d733656..b234dbd293 100644 --- a/libs/pbd/pbd/controllable_descriptor.h +++ b/libs/pbd/pbd/controllable_descriptor.h @@ -23,9 +23,11 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -class ControllableDescriptor { +class LIBPBD_API ControllableDescriptor { public: enum TopLevelType { RemoteControlID, diff --git a/libs/pbd/pbd/convert.h b/libs/pbd/pbd/convert.h index fec0248157..1269254906 100644 --- a/libs/pbd/pbd/convert.h +++ b/libs/pbd/pbd/convert.h @@ -27,25 +27,27 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -std::string short_version (std::string, std::string::size_type target_length); +LIBPBD_API std::string short_version (std::string, std::string::size_type target_length); -int atoi (const std::string&); -int32_t atol (const std::string&); -int64_t atoll (const std::string&); -double atof (const std::string&); -std::string url_decode (std::string const &); +LIBPBD_API int atoi (const std::string&); +LIBPBD_API int32_t atol (const std::string&); +LIBPBD_API int64_t atoll (const std::string&); +LIBPBD_API double atof (const std::string&); +LIBPBD_API std::string url_decode (std::string const &); -std::string capitalize (const std::string&); +LIBPBD_API std::string capitalize (const std::string&); // std::string length2string (const int32_t frames, const float sample_rate); -std::string length2string (const int64_t frames, const double sample_rate); +LIBPBD_API std::string length2string (const int64_t frames, const double sample_rate); -std::vector internationalize (const char *, const char **); -bool strings_equal_ignore_case (const std::string& a, const std::string& b); +LIBPBD_API std::vector internationalize (const char *, const char **); +LIBPBD_API bool strings_equal_ignore_case (const std::string& a, const std::string& b); -template std::string +template std::string LIBPBD_API to_string (T t, std::ios_base & (*f)(std::ios_base&)) { std::ostringstream oss; @@ -53,10 +55,9 @@ to_string (T t, std::ios_base & (*f)(std::ios_base&)) return oss.str(); } -bool string_is_affirmative (const std::string&); +LIBPBD_API bool string_is_affirmative (const std::string&); -const char * -sgettext (const char *, const char *); +LIBPBD_API const char* sgettext (const char *, const char *); } //namespace PBD diff --git a/libs/pbd/pbd/cpus.h b/libs/pbd/pbd/cpus.h index 1488f30068..c71567ddac 100644 --- a/libs/pbd/pbd/cpus.h +++ b/libs/pbd/pbd/cpus.h @@ -23,6 +23,8 @@ #include -extern uint32_t hardware_concurrency (); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API extern uint32_t hardware_concurrency (); #endif /* __libpbd_cpus_h__ */ diff --git a/libs/pbd/pbd/crossthread.h b/libs/pbd/pbd/crossthread.h index 13ab37d38d..d172c9c60f 100644 --- a/libs/pbd/pbd/crossthread.h +++ b/libs/pbd/pbd/crossthread.h @@ -26,6 +26,8 @@ #include +#include "pbd/libpbd_visibility.h" + /** A simple abstraction of a mechanism of signalling one thread from another. * The signaller calls ::wakeup() to tell the signalled thread to check for * work to be done. @@ -35,7 +37,7 @@ * in Glib main loop based situations. */ -class CrossThreadChannel { +class LIBPBD_API CrossThreadChannel { public: /** if @a non_blocking is true, the channel will not cause blocking * when used in an event loop based on poll/select or the glib main diff --git a/libs/pbd/pbd/debug.h b/libs/pbd/pbd/debug.h index 989cd42dd1..dc7e1ce906 100644 --- a/libs/pbd/pbd/debug.h +++ b/libs/pbd/pbd/debug.h @@ -24,25 +24,27 @@ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { - extern uint64_t debug_bits; - uint64_t new_debug_bit (const char* name); - void debug_print (const char* prefix, std::string str); - void set_debug_bits (uint64_t bits); - int parse_debug_options (const char* str); - void list_debug_options (); + LIBPBD_API extern uint64_t debug_bits; + LIBPBD_API uint64_t new_debug_bit (const char* name); + LIBPBD_API void debug_print (const char* prefix, std::string str); + LIBPBD_API void set_debug_bits (uint64_t bits); + LIBPBD_API int parse_debug_options (const char* str); + LIBPBD_API void list_debug_options (); namespace DEBUG { /* this namespace is so that we can write DEBUG::bit_name */ - extern uint64_t Stateful; - extern uint64_t Properties; - extern uint64_t FileManager; - extern uint64_t Pool; - extern uint64_t EventLoop; - extern uint64_t AbstractUI; + LIBPBD_API extern uint64_t Stateful; + LIBPBD_API extern uint64_t Properties; + LIBPBD_API extern uint64_t FileManager; + LIBPBD_API extern uint64_t Pool; + LIBPBD_API extern uint64_t EventLoop; + LIBPBD_API extern uint64_t AbstractUI; } } diff --git a/libs/pbd/pbd/debug_rt_alloc.h b/libs/pbd/pbd/debug_rt_alloc.h index 2bbea90278..0d1b4bd47c 100644 --- a/libs/pbd/pbd/debug_rt_alloc.h +++ b/libs/pbd/pbd/debug_rt_alloc.h @@ -22,18 +22,20 @@ #ifndef __pbd_debug_rt_alloc_h__ #define __pbd_debug_rt_alloc_h__ +#include "pbd/libpbd_visibility.h" + extern "C" { /** Should be set to point to a function which returns non-0 if a malloc is * allowed in the current situation, or 0 if not. */ -extern int (*pbd_alloc_allowed) (); +LIBPBD_API extern int (*pbd_alloc_allowed) (); /** Call this to suspend malloc checking until a call to resume_rt_malloc_checks */ -extern void suspend_rt_malloc_checks (); +LIBPBD_API extern void suspend_rt_malloc_checks (); /** Resume malloc checking after a suspension */ -extern void resume_rt_malloc_checks (); +LIBPBD_API extern void resume_rt_malloc_checks (); } diff --git a/libs/pbd/pbd/demangle.h b/libs/pbd/pbd/demangle.h index aecd966f47..c9f5c194c0 100644 --- a/libs/pbd/pbd/demangle.h +++ b/libs/pbd/pbd/demangle.h @@ -28,9 +28,11 @@ #include #endif +#include "pbd/libpbd_visibility.h" + namespace PBD { - template + template LIBPBD_API std::string demangled_name (T const & obj) { #ifdef __GNUC__ diff --git a/libs/pbd/pbd/destructible.h b/libs/pbd/pbd/destructible.h index 8881b45c55..78f6f83b7a 100644 --- a/libs/pbd/pbd/destructible.h +++ b/libs/pbd/pbd/destructible.h @@ -21,10 +21,11 @@ #define __pbd_destructible_h__ #include "pbd/signals.h" +#include "pbd/libpbd_visibility.h" namespace PBD { -class Destructible { +class LIBPBD_API Destructible { public: Destructible() {} virtual ~Destructible () { Destroyed(); } diff --git a/libs/pbd/pbd/enumwriter.h b/libs/pbd/pbd/enumwriter.h index 95f1ea9e9f..634767e7f2 100644 --- a/libs/pbd/pbd/enumwriter.h +++ b/libs/pbd/pbd/enumwriter.h @@ -27,9 +27,11 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -class unknown_enumeration : public std::exception { +class LIBPBD_API unknown_enumeration : public std::exception { public: unknown_enumeration (std::string const & e) throw() { std::stringstream s; @@ -47,7 +49,7 @@ private: std::string _message; }; -class EnumWriter { +class LIBPBD_API EnumWriter { public: static EnumWriter& instance(); static void destroy(); diff --git a/libs/pbd/pbd/epa.h b/libs/pbd/pbd/epa.h index 477d7f9678..6d305c5c4c 100644 --- a/libs/pbd/pbd/epa.h +++ b/libs/pbd/pbd/epa.h @@ -23,9 +23,11 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -class EnvironmentalProtectionAgency { +class LIBPBD_API EnvironmentalProtectionAgency { public: EnvironmentalProtectionAgency (bool arm = true, const std::string& envname = std::string()); ~EnvironmentalProtectionAgency (); diff --git a/libs/pbd/pbd/error.h b/libs/pbd/pbd/error.h index 58842d68eb..eff88fbf10 100644 --- a/libs/pbd/pbd/error.h +++ b/libs/pbd/pbd/error.h @@ -19,13 +19,14 @@ #ifndef __libpbd_error_h__ #define __libpbd_error_h__ +#include "pbd/libpbd_visibility.h" #include "transmitter.h" namespace PBD { - extern Transmitter error; - extern Transmitter info; - extern Transmitter warning; - extern Transmitter fatal; + LIBPBD_API extern Transmitter error; + LIBPBD_API extern Transmitter info; + LIBPBD_API extern Transmitter warning; + LIBPBD_API extern Transmitter fatal; } #endif // __libpbd_error_h__ diff --git a/libs/pbd/pbd/event_loop.h b/libs/pbd/pbd/event_loop.h index b5ee9b8000..5baa5e04be 100644 --- a/libs/pbd/pbd/event_loop.h +++ b/libs/pbd/pbd/event_loop.h @@ -24,6 +24,8 @@ #include /* we don't need this here, but anything calling call_slot() probably will, so this is convenient */ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { @@ -36,7 +38,7 @@ namespace PBD * when something like this is needed (it inherits from EventLoop). */ -class EventLoop +class LIBPBD_API EventLoop { public: EventLoop() {} diff --git a/libs/pbd/pbd/failed_constructor.h b/libs/pbd/pbd/failed_constructor.h index b13964e355..92c3f19c76 100644 --- a/libs/pbd/pbd/failed_constructor.h +++ b/libs/pbd/pbd/failed_constructor.h @@ -22,7 +22,9 @@ #include -class failed_constructor : public std::exception { +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API failed_constructor : public std::exception { public: virtual const char *what() const throw() { return "failed constructor"; } }; diff --git a/libs/pbd/pbd/fastlog.h b/libs/pbd/pbd/fastlog.h index f64ad996cf..e8aef4119d 100644 --- a/libs/pbd/pbd/fastlog.h +++ b/libs/pbd/pbd/fastlog.h @@ -10,7 +10,9 @@ as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. #include /* for HUGE_VAL */ -static inline float fast_log2 (float val) +#include "pbd/libpbd_visibility.h" + +LIBPBD_API static inline float fast_log2 (float val) { /* don't use reinterpret_cast<> because that prevents this from being used by pure C code (for example, GnomeCanvasItems) @@ -29,16 +31,16 @@ static inline float fast_log2 (float val) return (val + log_2); } -static inline float fast_log (const float val) +LIBPBD_API static inline float fast_log (const float val) { return (fast_log2 (val) * 0.69314718f); } -static inline float fast_log10 (const float val) +LIBPBD_API static inline float fast_log10 (const float val) { return fast_log2(val) / 3.312500f; } -static inline float minus_infinity(void) { return -HUGE_VAL; } +LIBPBD_API static inline float minus_infinity(void) { return -HUGE_VAL; } #endif /* __pbd_fastlog_h__ */ diff --git a/libs/pbd/pbd/file_manager.h b/libs/pbd/pbd/file_manager.h index 14552f9fef..d85c88fa46 100644 --- a/libs/pbd/pbd/file_manager.h +++ b/libs/pbd/pbd/file_manager.h @@ -25,11 +25,13 @@ #include #include #include + +#include "pbd/libpbd_visibility.h" #include "pbd/signals.h" namespace PBD { -class FileManager; +class LIBPBD_API FileManager; /** Parent class for FileDescriptors. * @@ -45,7 +47,7 @@ class FileManager; * open files to stay within limits imposed by the operating system. */ -class FileDescriptor +class LIBPBD_API FileDescriptor { public: FileDescriptor (std::string const &, bool); @@ -86,7 +88,7 @@ private: /** FileDescriptor for a file to be opened using POSIX open */ -class FdFileDescriptor : public FileDescriptor +class LIBPBD_API FdFileDescriptor : public FileDescriptor { public: FdFileDescriptor (std::string const & file_name, bool writeable, mode_t mode); @@ -107,7 +109,7 @@ private: }; /** FileDescriptor for a file opened using stdio */ -class StdioFileDescriptor : public FileDescriptor +class LIBPBD_API StdioFileDescriptor : public FileDescriptor { public: StdioFileDescriptor (std::string const & file_name, std::string const & mode); @@ -129,7 +131,7 @@ private: /** Class to limit the number of files held open */ -class FileManager +class LIBPBD_API FileManager { public: FileManager (); diff --git a/libs/pbd/pbd/floating.h b/libs/pbd/pbd/floating.h index 105a976637..b03158c277 100644 --- a/libs/pbd/pbd/floating.h +++ b/libs/pbd/pbd/floating.h @@ -28,9 +28,11 @@ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -union Float_t +union LIBPBD_API Float_t { Float_t (float num = 0.0f) : f(num) {} @@ -45,7 +47,7 @@ union Float_t /* Note: ULPS = Units in the Last Place */ -static inline bool floateq (float a, float b, int max_ulps_diff) +LIBPBD_API static inline bool floateq (float a, float b, int max_ulps_diff) { Float_t ua (a); Float_t ub (b); diff --git a/libs/pbd/pbd/forkexec.h b/libs/pbd/pbd/forkexec.h index 236cffa301..e6d8f0c5ea 100644 --- a/libs/pbd/pbd/forkexec.h +++ b/libs/pbd/pbd/forkexec.h @@ -22,7 +22,9 @@ #include -pid_t forkexec(char **argv, char **envp, int outpipe[2], int inpipe[2]); -pid_t forkexec_cmd(char *cmd, char **envp, int outpipe[2], int inpipe[2]); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API pid_t forkexec(char **argv, char **envp, int outpipe[2], int inpipe[2]); +LIBPBD_API pid_t forkexec_cmd(char *cmd, char **envp, int outpipe[2], int inpipe[2]); #endif // __forkexec_h__ diff --git a/libs/pbd/pbd/fpu.h b/libs/pbd/pbd/fpu.h index ff3df481d0..6627951e9f 100644 --- a/libs/pbd/pbd/fpu.h +++ b/libs/pbd/pbd/fpu.h @@ -20,10 +20,11 @@ #ifndef __pbd_fpu_h__ #define __pbd_fpu_h__ +#include "pbd/libpbd_visibility.h" + namespace PBD { - -class FPU { +class LIBPBD_API FPU { private: enum Flags { HasFlushToZero = 0x1, diff --git a/libs/pbd/pbd/functor_command.h b/libs/pbd/pbd/functor_command.h index b651c6f775..d2aacd18ac 100644 --- a/libs/pbd/pbd/functor_command.h +++ b/libs/pbd/pbd/functor_command.h @@ -25,6 +25,7 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/xml++.h" #include "pbd/shiva.h" #include "pbd/command.h" @@ -36,7 +37,7 @@ namespace PBD { template -class FunctorCommand : public Command +class LIBPBD_API FunctorCommand : public Command { private: typedef void (obj_type::*functor_type)(arg_type); diff --git a/libs/pbd/pbd/id.h b/libs/pbd/pbd/id.h index 6a9332be53..a7d0c2c622 100644 --- a/libs/pbd/pbd/id.h +++ b/libs/pbd/pbd/id.h @@ -25,9 +25,11 @@ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -class ID { +class LIBPBD_API ID { public: ID (); ID (std::string); @@ -68,6 +70,7 @@ class ID { }; } -std::ostream& operator<< (std::ostream& ostr, const PBD::ID&); + +LIBPBD_API std::ostream& operator<< (std::ostream& ostr, const PBD::ID&); #endif /* __pbd_id_h__ */ diff --git a/libs/pbd/pbd/libpbd_visibility.h b/libs/pbd/pbd/libpbd_visibility.h new file mode 100644 index 0000000000..0aa309a4a4 --- /dev/null +++ b/libs/pbd/pbd/libpbd_visibility.h @@ -0,0 +1,58 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libpbd_libpbd_visibility_h__ +#define __libpbd_libpbd_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBPBD_DLL_IMPORT __declspec(dllimport) + #define LIBPBD_DLL_EXPORT __declspec(dllexport) + #define LIBPBD_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBPBD_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBPBD_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBPBD_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBPBD_DLL_IMPORT + #define LIBPBD_DLL_EXPORT + #define LIBPBD_DLL_LOCAL + #define LIBPBD_DLL_IMPORT_CLASS + #define LIBPBD_DLL_EXPORT_CLASS + #endif +#endif + +#ifdef LIBPBD_DLL // libpbd is a DLL +#ifdef LIBPBD_DLL_EXPORTS // defined if we are building the libpbd DLL (instead of using it) + #define LIBPBD_API LIBPBD_DLL_EXPORT +#else + #define LIBPBD_API LIBPBD_DLL_IMPORT +#endif +#define LIBPBD_LOCAL LIBPBD_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBPBD_API +#define LIBPBD_LOCAL +#endif + +#endif /* __libpbd_libpbd_visibility_h__ */ diff --git a/libs/pbd/pbd/locale_guard.h b/libs/pbd/pbd/locale_guard.h index 480cc0fddb..cac77ded24 100644 --- a/libs/pbd/pbd/locale_guard.h +++ b/libs/pbd/pbd/locale_guard.h @@ -20,9 +20,11 @@ #ifndef __pbd_locale_guard__ #define __pbd_locale_guard__ +#include "pbd/libpbd_visibility.h" + namespace PBD { -struct LocaleGuard { +struct LIBPBD_API LocaleGuard { LocaleGuard (const char*); ~LocaleGuard (); const char* old; diff --git a/libs/pbd/pbd/malign.h b/libs/pbd/pbd/malign.h index bc78882dc7..07f42f586f 100644 --- a/libs/pbd/pbd/malign.h +++ b/libs/pbd/pbd/malign.h @@ -22,6 +22,8 @@ #include -int cache_aligned_malloc (void** memptr, size_t size); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API int cache_aligned_malloc (void** memptr, size_t size); #endif /* __pbd_malign_h__ */ diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h index 45cb100a36..ba09225608 100644 --- a/libs/pbd/pbd/memento_command.h +++ b/libs/pbd/pbd/memento_command.h @@ -23,6 +23,7 @@ #include +#include "pbd/libpbd_visibility.h" #include "pbd/command.h" #include "pbd/stacktrace.h" #include "pbd/xml++.h" @@ -49,7 +50,7 @@ * references to non-existant crossfades. To get around this, CrossfadeBinder * can do `just-in-time' binding from the crossfade ID. */ -template +template LIBPBD_API class MementoCommandBinder : public PBD::Destructible { public: @@ -66,7 +67,7 @@ public: }; /** A simple MementoCommandBinder which binds directly to an object */ -template +template LIBPBD_API class SimpleMementoCommandBinder : public MementoCommandBinder { public: @@ -98,7 +99,7 @@ private: * (from Stateful::get_state()), so undo becomes restoring the before * memento, and redo is restoring the after memento. */ -template +template LIBPBD_API class MementoCommand : public Command { public: diff --git a/libs/pbd/pbd/mountpoint.h b/libs/pbd/pbd/mountpoint.h index e0ec1be7f9..3500f8a4ca 100644 --- a/libs/pbd/pbd/mountpoint.h +++ b/libs/pbd/pbd/mountpoint.h @@ -22,6 +22,8 @@ #include -std::string mountpoint (std::string path); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API std::string mountpoint (std::string path); #endif // __pbd_mountpoint_h__ diff --git a/libs/pbd/pbd/openuri.h b/libs/pbd/pbd/openuri.h index ec17b5a34a..8ba6ffca62 100644 --- a/libs/pbd/pbd/openuri.h +++ b/libs/pbd/pbd/openuri.h @@ -22,9 +22,11 @@ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { - bool open_uri (const char*); - bool open_uri (const std::string&); + LIBPBD_API bool open_uri (const char*); + LIBPBD_API bool open_uri (const std::string&); } #endif diff --git a/libs/pbd/pbd/pathexpand.h b/libs/pbd/pbd/pathexpand.h index a7b9f7557a..5f1c03f8ee 100644 --- a/libs/pbd/pbd/pathexpand.h +++ b/libs/pbd/pbd/pathexpand.h @@ -21,9 +21,11 @@ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { - std::string path_expand (std::string path); - std::string search_path_expand (std::string path); + LIBPBD_API std::string path_expand (std::string path); + LIBPBD_API std::string search_path_expand (std::string path); } #endif /* __libpbd_path_expand_h__ */ diff --git a/libs/pbd/pbd/pathscanner.h b/libs/pbd/pbd/pathscanner.h index 1b7ef58655..ef6499c759 100644 --- a/libs/pbd/pbd/pathscanner.h +++ b/libs/pbd/pbd/pathscanner.h @@ -24,7 +24,9 @@ #include #include -class PathScanner +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API PathScanner { public: diff --git a/libs/pbd/pbd/pbd.h b/libs/pbd/pbd/pbd.h index 5b3745f0ed..6d2584f64b 100644 --- a/libs/pbd/pbd/pbd.h +++ b/libs/pbd/pbd/pbd.h @@ -20,10 +20,12 @@ #ifndef __libpbd_pbd_h__ #define __libpbd_pbd_h__ +#include "pbd/libpbd_visibility.h" + namespace PBD { - bool init (); - void cleanup (); + LIBPBD_API bool init (); + LIBPBD_API void cleanup (); } // namespace PBD diff --git a/libs/pbd/pbd/pool.h b/libs/pbd/pbd/pool.h index 58c5861d23..165a3aac4b 100644 --- a/libs/pbd/pbd/pool.h +++ b/libs/pbd/pbd/pool.h @@ -25,12 +25,13 @@ #include +#include "pbd/libpbd_visibility.h" #include "pbd/ringbuffer.h" /** A pool of data items that can be allocated, read from and written to * without system memory allocation or locking. */ -class Pool +class LIBPBD_API Pool { public: Pool (std::string name, unsigned long item_size, unsigned long nitems); @@ -49,7 +50,7 @@ class Pool void *block; ///< data storage area }; -class SingleAllocMultiReleasePool : public Pool +class LIBPBD_API SingleAllocMultiReleasePool : public Pool { public: SingleAllocMultiReleasePool (std::string name, unsigned long item_size, unsigned long nitems); @@ -63,7 +64,7 @@ class SingleAllocMultiReleasePool : public Pool }; -class MultiAllocSingleReleasePool : public Pool +class LIBPBD_API MultiAllocSingleReleasePool : public Pool { public: MultiAllocSingleReleasePool (std::string name, unsigned long item_size, unsigned long nitems); @@ -76,7 +77,7 @@ class MultiAllocSingleReleasePool : public Pool Glib::Threads::Mutex m_lock; }; -class PerThreadPool; +class LIBPBD_API PerThreadPool; /** Management of a per-thread pool of data that is allocated by one thread and * freed by one other thread. Not safe for use when there is more than 1 @@ -90,7 +91,7 @@ class PerThreadPool; * data), and so it calls alloc(), passes a pointer to the result of the alloc * to another thread, which later calls push() to "free" it. */ -class CrossThreadPool : public Pool +class LIBPBD_API CrossThreadPool : public Pool { public: CrossThreadPool (std::string n, unsigned long isize, unsigned long nitems, PerThreadPool *); @@ -112,7 +113,7 @@ class CrossThreadPool : public Pool /** A class to manage per-thread pools of memory. One object of this class is instantiated, * and then it is used to create per-thread pools for 1 or more threads as required. */ -class PerThreadPool +class LIBPBD_API PerThreadPool { public: PerThreadPool (); diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h index e65929c60c..27a0be1895 100644 --- a/libs/pbd/pbd/properties.h +++ b/libs/pbd/pbd/properties.h @@ -26,6 +26,7 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/xml++.h" #include "pbd/property_basics.h" #include "pbd/property_list.h" @@ -36,7 +37,7 @@ namespace PBD { /** Parent class for classes which represent a single scalar property in a Stateful object */ template -class PropertyTemplate : public PropertyBase +class LIBPBD_API PropertyTemplate : public PropertyBase { public: PropertyTemplate (PropertyDescriptor p, T const& v) @@ -196,7 +197,7 @@ private: PropertyTemplate (PropertyTemplate const &); }; -template +template LIBPBD_API std::ostream & operator<<(std::ostream& os, PropertyTemplate const& s) { return os << s.val (); @@ -206,7 +207,7 @@ std::ostream & operator<<(std::ostream& os, PropertyTemplate const& s) * with types that can be written to / read from stringstreams. */ template -class Property : public PropertyTemplate +class LIBPBD_API Property : public PropertyTemplate { public: Property (PropertyDescriptor q, T const& v) @@ -284,7 +285,7 @@ private: * separators, etc. */ template<> -class Property : public PropertyTemplate +class LIBPBD_API Property : public PropertyTemplate { public: Property (PropertyDescriptor d, std::string const & v) @@ -318,7 +319,7 @@ private: }; template -class EnumProperty : public Property +class LIBPBD_API EnumProperty : public Property { public: EnumProperty (PropertyDescriptor q, T const& v) @@ -351,7 +352,7 @@ private: * one. */ template -class SharedStatefulProperty : public PropertyBase +class LIBPBD_API SharedStatefulProperty : public PropertyBase { public: typedef boost::shared_ptr Ptr; diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h index 2255a3d79b..2da21ddb84 100644 --- a/libs/pbd/pbd/property_basics.h +++ b/libs/pbd/pbd/property_basics.h @@ -24,20 +24,21 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/xml++.h" class Command; namespace PBD { -class PropertyList; -class StatefulDiffCommand; +class LIBPBD_API PropertyList; +class LIBPBD_API StatefulDiffCommand; /** A unique identifier for a property of a Stateful object */ typedef GQuark PropertyID; template -struct PropertyDescriptor { +struct LIBPBD_API PropertyDescriptor { PropertyDescriptor () : property_id (0) {} PropertyDescriptor (PropertyID pid) : property_id (pid) {} @@ -46,7 +47,7 @@ struct PropertyDescriptor { }; /** A list of IDs of Properties that have changed in some situation or other */ -class PropertyChange : public std::set +class LIBPBD_API PropertyChange : public std::set { public: PropertyChange() {} @@ -83,7 +84,7 @@ public: * - to handle current state (when serializing Stateful objects) * - to handle history since some operation was started (when making StatefulDiffCommands for undo) */ -class PropertyBase +class LIBPBD_API PropertyBase { public: PropertyBase (PropertyID pid) diff --git a/libs/pbd/pbd/property_list.h b/libs/pbd/pbd/property_list.h index 12b7995009..abb85e77d5 100644 --- a/libs/pbd/pbd/property_list.h +++ b/libs/pbd/pbd/property_list.h @@ -22,6 +22,7 @@ #include +#include "pbd/libpbd_visibility.h" #include "pbd/property_basics.h" class XMLNode; @@ -29,7 +30,7 @@ class XMLNode; namespace PBD { /** A list of properties, mapped using their ID */ -class PropertyList : public std::map +class LIBPBD_API PropertyList : public std::map { public: PropertyList (); @@ -61,7 +62,7 @@ protected: * own Properties store them in an OwnedPropertyList * to avoid having them deleted at the wrong time. */ -class OwnedPropertyList : public PropertyList +class LIBPBD_API OwnedPropertyList : public PropertyList { public: OwnedPropertyList(); diff --git a/libs/pbd/pbd/pthread_utils.h b/libs/pbd/pbd/pthread_utils.h index 0c7b5f3ac1..c66feb73a5 100644 --- a/libs/pbd/pbd/pthread_utils.h +++ b/libs/pbd/pbd/pthread_utils.h @@ -25,18 +25,19 @@ #include #include -#include +#include "pbd/libpbd_visibility.h" +#include "pbd/signals.h" -int pthread_create_and_store (std::string name, pthread_t *thread, void * (*start_routine)(void *), void * arg); -void pthread_cancel_one (pthread_t thread); -void pthread_cancel_all (); -void pthread_kill_all (int signum); -const char* pthread_name (); -void pthread_set_name (const char* name); +LIBPBD_API int pthread_create_and_store (std::string name, pthread_t *thread, void * (*start_routine)(void *), void * arg); +LIBPBD_API void pthread_cancel_one (pthread_t thread); +LIBPBD_API void pthread_cancel_all (); +LIBPBD_API void pthread_kill_all (int signum); +LIBPBD_API const char* pthread_name (); +LIBPBD_API void pthread_set_name (const char* name); namespace PBD { - extern void notify_gui_about_thread_creation (std::string, pthread_t, std::string, int requests = 256); - extern PBD::Signal4 ThreadCreatedWithRequestSize; + LIBPBD_API extern void notify_gui_about_thread_creation (std::string, pthread_t, std::string, int requests = 256); + LIBPBD_API extern PBD::Signal4 ThreadCreatedWithRequestSize; } #endif /* __pbd_pthread_utils__ */ diff --git a/libs/pbd/pbd/rcu.h b/libs/pbd/pbd/rcu.h index 909954fc0e..6ee68afabf 100644 --- a/libs/pbd/pbd/rcu.h +++ b/libs/pbd/pbd/rcu.h @@ -25,6 +25,8 @@ #include +#include "pbd/libpbd_visibility.h" + /** @file Defines a set of classes to implement Read-Copy-Update. We do not attempt to define RCU here - use google. The design consists of two parts: an RCUManager and an RCUWriter. @@ -43,7 +45,7 @@ and managed object. */ template -class RCUManager +class LIBPBD_API RCUManager { public: @@ -109,7 +111,7 @@ class RCUManager means that no actual objects will be deleted incorrectly if this is misused. */ template -class SerializedRCUManager : public RCUManager +class LIBPBD_API SerializedRCUManager : public RCUManager { public: @@ -212,7 +214,7 @@ private: */ template -class RCUWriter +class LIBPBD_API RCUWriter { public: diff --git a/libs/pbd/pbd/receiver.h b/libs/pbd/pbd/receiver.h index 32fb84fa38..d3303ae192 100644 --- a/libs/pbd/pbd/receiver.h +++ b/libs/pbd/pbd/receiver.h @@ -24,11 +24,12 @@ #include +#include "pbd/libpbd_visibility.h" #include "transmitter.h" class strstream; -class Receiver : public sigc::trackable +class LIBPBD_API Receiver : public sigc::trackable { public: Receiver (); diff --git a/libs/pbd/pbd/replace_all.h b/libs/pbd/pbd/replace_all.h index 3bc465d89f..e7fcc1e0ce 100644 --- a/libs/pbd/pbd/replace_all.h +++ b/libs/pbd/pbd/replace_all.h @@ -22,6 +22,8 @@ #include -int replace_all (std::string& str, const std::string& target, const std::string& replacement); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API int replace_all (std::string& str, const std::string& target, const std::string& replacement); #endif // __pbd_replace_all_h__ diff --git a/libs/pbd/pbd/ringbuffer.h b/libs/pbd/pbd/ringbuffer.h index 652457b493..bb2b8244f9 100644 --- a/libs/pbd/pbd/ringbuffer.h +++ b/libs/pbd/pbd/ringbuffer.h @@ -23,8 +23,10 @@ #include #include +#include "pbd/libpbd_visibility.h" + template -class RingBuffer +class LIBPBD_API RingBuffer { public: RingBuffer (guint sz) { @@ -118,7 +120,7 @@ class RingBuffer guint size_mask; }; -template guint +template LIBPBD_API guint RingBuffer::read (T *dest, guint cnt) { guint free_cnt; @@ -157,7 +159,7 @@ RingBuffer::read (T *dest, guint cnt) return to_read; } -template guint +template LIBPBD_API guint RingBuffer::write (T const *src, guint cnt) { @@ -197,7 +199,7 @@ RingBuffer::write (T const *src, guint cnt) return to_write; } -template void +template LIBPBD_API void RingBuffer::get_read_vector (RingBuffer::rw_vector *vec) { @@ -238,7 +240,7 @@ RingBuffer::get_read_vector (RingBuffer::rw_vector *vec) } } -template void +template LIBPBD_API void RingBuffer::get_write_vector (RingBuffer::rw_vector *vec) { diff --git a/libs/pbd/pbd/ringbufferNPT.h b/libs/pbd/pbd/ringbufferNPT.h index e43f967592..65fe939597 100644 --- a/libs/pbd/pbd/ringbufferNPT.h +++ b/libs/pbd/pbd/ringbufferNPT.h @@ -25,12 +25,14 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { /* ringbuffer class where the element size is not required to be a power of two */ template -class RingBufferNPT +class LIBPBD_API RingBufferNPT { public: RingBufferNPT (size_t sz) { @@ -118,7 +120,7 @@ class RingBufferNPT mutable gint read_ptr; }; -template size_t +template LIBPBD_API size_t RingBufferNPT::read (T *dest, size_t cnt) { size_t free_cnt; @@ -157,7 +159,7 @@ RingBufferNPT::read (T *dest, size_t cnt) return to_read; } -template size_t +template LIBPBD_API size_t RingBufferNPT::write (const T *src, size_t cnt) { size_t free_cnt; @@ -196,7 +198,7 @@ RingBufferNPT::write (const T *src, size_t cnt) return to_write; } -template void +template LIBPBD_API void RingBufferNPT::get_read_vector (RingBufferNPT::rw_vector *vec) { size_t free_cnt; @@ -236,7 +238,7 @@ RingBufferNPT::get_read_vector (RingBufferNPT::rw_vector *vec) } } -template void +template LIBPBD_API void RingBufferNPT::get_write_vector (RingBufferNPT::rw_vector *vec) { size_t free_cnt; diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index 5358d6e14c..ad0b6c75d5 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -23,6 +23,8 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { /** @@ -36,7 +38,7 @@ namespace PBD { * The SearchPath class does not test whether the paths exist * or are directories. It is basically just a container. */ -class SearchPath : public std::vector +class LIBPBD_API SearchPath : public std::vector { public: /** diff --git a/libs/pbd/pbd/selectable.h b/libs/pbd/pbd/selectable.h index 85f3e79ab0..cb4677cba4 100644 --- a/libs/pbd/pbd/selectable.h +++ b/libs/pbd/pbd/selectable.h @@ -28,14 +28,16 @@ #include +#include "pbd/libpbd_visibility.h" + namespace Select { - enum Condition { + enum LIBPBD_API Condition { Readable = 0x1, Writable = 0x2, Exception = 0x4 }; -class Selectable : public sigc::trackable +class LIBPBD_API Selectable : public sigc::trackable { public: @@ -70,7 +72,7 @@ class Selectable : public sigc::trackable std::string path; }; -class Selector { +class LIBPBD_API Selector { private: int post_select (fd_set *, fd_set *, fd_set *); int _max_fd; diff --git a/libs/pbd/pbd/semaphore.h b/libs/pbd/pbd/semaphore.h index e54063a15a..a2390f5a18 100644 --- a/libs/pbd/pbd/semaphore.h +++ b/libs/pbd/pbd/semaphore.h @@ -29,6 +29,7 @@ # include #endif +#include "pbd/libpbd_visibility.h" #include "pbd/failed_constructor.h" namespace PBD { @@ -45,7 +46,7 @@ namespace PBD { only safe way to reliably signal from a real-time audio thread. The counting semantics also complement ringbuffers of events nicely. */ -class Semaphore +class LIBPBD_API Semaphore { public: /** diff --git a/libs/pbd/pbd/semutils.h b/libs/pbd/pbd/semutils.h index 6f5f0e9331..719a3d0f46 100644 --- a/libs/pbd/pbd/semutils.h +++ b/libs/pbd/pbd/semutils.h @@ -21,9 +21,11 @@ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -class ProcessSemaphore { +class LIBPBD_API ProcessSemaphore { private: #ifdef __APPLE__ sem_t* _sem; diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h index b9d59724dd..28775b5f3c 100644 --- a/libs/pbd/pbd/sequence_property.h +++ b/libs/pbd/pbd/sequence_property.h @@ -27,6 +27,7 @@ #include +#include "pbd/libpbd_visibility.h" #include "pbd/convert.h" #include "pbd/id.h" #include "pbd/property_basics.h" @@ -43,7 +44,7 @@ namespace PBD { * any change. */ template -class SequenceProperty : public PropertyBase +class LIBPBD_API SequenceProperty : public PropertyBase { public: typedef std::set ChangeContainer; diff --git a/libs/pbd/pbd/shortpath.h b/libs/pbd/pbd/shortpath.h index 55431bf34e..48dbb0eee2 100644 --- a/libs/pbd/pbd/shortpath.h +++ b/libs/pbd/pbd/shortpath.h @@ -22,6 +22,8 @@ #include -Glib::ustring short_path (const Glib::ustring& path, Glib::ustring::size_type target_characters); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API Glib::ustring short_path (const Glib::ustring& path, Glib::ustring::size_type target_characters); #endif /* __pbd_shortpath_h__ */ diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h index 69c52f57cf..871a2c0b18 100644 --- a/libs/pbd/pbd/signals.h +++ b/libs/pbd/pbd/signals.h @@ -31,13 +31,14 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/event_loop.h" namespace PBD { -class Connection; +class LIBPBD_API Connection; -class SignalBase +class LIBPBD_API SignalBase { public: virtual ~SignalBase () {} @@ -47,7 +48,7 @@ protected: Glib::Threads::Mutex _mutex; }; -class Connection : public boost::enable_shared_from_this +class LIBPBD_API Connection : public boost::enable_shared_from_this { public: Connection (SignalBase* b) : _signal (b) {} @@ -73,7 +74,7 @@ private: }; template -class OptionalLastValue +class LIBPBD_API OptionalLastValue { public: typedef boost::optional result_type; @@ -92,7 +93,7 @@ public: typedef boost::shared_ptr UnscopedConnection; -class ScopedConnection +class LIBPBD_API ScopedConnection { public: ScopedConnection () {} @@ -123,7 +124,7 @@ private: UnscopedConnection _c; }; -class ScopedConnectionList : public boost::noncopyable +class LIBPBD_API ScopedConnectionList : public boost::noncopyable { public: ScopedConnectionList(); diff --git a/libs/pbd/pbd/sndfile_manager.h b/libs/pbd/pbd/sndfile_manager.h index 2167cadf5f..7abc8ea3d6 100644 --- a/libs/pbd/pbd/sndfile_manager.h +++ b/libs/pbd/pbd/sndfile_manager.h @@ -25,13 +25,15 @@ #include #include #include + +#include "pbd/libpbd_visibility.h" #include "pbd/signals.h" #include "pbd/file_manager.h" namespace PBD { /** FileDescriptor for a file to be opened using libsndfile */ -class SndFileDescriptor : public FileDescriptor +class LIBPBD_API SndFileDescriptor : public FileDescriptor { public: SndFileDescriptor (std::string const & file_name, bool writeable, SF_INFO* info); diff --git a/libs/pbd/pbd/stacktrace.h b/libs/pbd/pbd/stacktrace.h index 94d07cab96..c4381bc0ed 100644 --- a/libs/pbd/pbd/stacktrace.h +++ b/libs/pbd/pbd/stacktrace.h @@ -34,12 +34,15 @@ #include #endif +#include "pbd/libpbd_visibility.h" + + namespace PBD { - void stacktrace (std::ostream& out, int levels = 0); - void trace_twb(); + LIBPBD_API void stacktrace (std::ostream& out, int levels = 0); + LIBPBD_API void trace_twb(); template -class thing_with_backtrace +class LIBPBD_API thing_with_backtrace { public: thing_with_backtrace () { @@ -108,8 +111,8 @@ private: static Glib::Threads::Mutex all_mutex; }; -template std::list *> PBD::thing_with_backtrace::all; -template Glib::Threads::Mutex PBD::thing_with_backtrace::all_mutex; +template LIBPBD_API std::list *> PBD::thing_with_backtrace::all; +template LIBPBD_API Glib::Threads::Mutex PBD::thing_with_backtrace::all_mutex; } // namespace PBD diff --git a/libs/pbd/pbd/stateful.h b/libs/pbd/pbd/stateful.h index 4808bc2911..7035af57c3 100644 --- a/libs/pbd/pbd/stateful.h +++ b/libs/pbd/pbd/stateful.h @@ -24,6 +24,7 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/id.h" #include "pbd/xml++.h" #include "pbd/property_basics.h" @@ -34,14 +35,14 @@ class XMLNode; namespace PBD { namespace sys { - class path; + class LIBPBD_API path; } -class PropertyList; -class OwnedPropertyList; +class LIBPBD_API PropertyList; +class LIBPBD_API OwnedPropertyList; /** Base class for objects with saveable and undoable state */ -class Stateful { +class LIBPBD_API Stateful { public: Stateful (); virtual ~Stateful(); diff --git a/libs/pbd/pbd/stateful_diff_command.h b/libs/pbd/pbd/stateful_diff_command.h index 2a213d7a17..f075a99746 100644 --- a/libs/pbd/pbd/stateful_diff_command.h +++ b/libs/pbd/pbd/stateful_diff_command.h @@ -22,18 +22,20 @@ #include #include + +#include "pbd/libpbd_visibility.h" #include "pbd/command.h" namespace PBD { -class StatefulDestructible; -class PropertyList; +class LIBPBD_API StatefulDestructible; +class LIBPBD_API PropertyList; /** A Command which stores its action as the differences between the before and after * state of a Stateful object. */ -class StatefulDiffCommand : public Command +class LIBPBD_API StatefulDiffCommand : public Command { public: StatefulDiffCommand (boost::shared_ptr); diff --git a/libs/pbd/pbd/statefuldestructible.h b/libs/pbd/pbd/statefuldestructible.h index 36eb43147c..79f5356c9f 100644 --- a/libs/pbd/pbd/statefuldestructible.h +++ b/libs/pbd/pbd/statefuldestructible.h @@ -20,12 +20,13 @@ #ifndef __pbd_stateful_destructible_h__ #define __pbd_stateful_destructible_h__ +#include "pbd/libpbd_visibility.h" #include "pbd/stateful.h" #include "pbd/destructible.h" namespace PBD { -class StatefulDestructible : public Stateful, public Destructible +class LIBPBD_API StatefulDestructible : public Stateful, public Destructible { }; diff --git a/libs/pbd/pbd/stl_delete.h b/libs/pbd/pbd/stl_delete.h index bca0ea9e21..b98bb5e8e3 100644 --- a/libs/pbd/pbd/stl_delete.h +++ b/libs/pbd/pbd/stl_delete.h @@ -20,12 +20,13 @@ #ifndef __libmisc_stl_delete_h__ #define __libmisc_stl_delete_h__ +#include "pbd/libpbd_visibility.h" /* To actually use any of these deletion functions, you need to first include the revelant container type header. */ #if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR) || defined(_LIBCPP_VECTOR) -template void vector_delete (std::vector *vec) +template LIBPBD_API void vector_delete (std::vector *vec) { typename std::vector::iterator i; @@ -37,7 +38,7 @@ template void vector_delete (std::vector *vec) #endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR || _LIBCPP_VECTOR #if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP) -template void map_delete (std::map *m) +template LIBPBD_API void map_delete (std::map *m) { typename std::map::iterator i; @@ -49,7 +50,7 @@ template void map_delete (std::map *m) #endif // _CPP_MAP || _GLIBCXX_MAP || __SGI_STL_MAP #if defined(_CPP_LIST) || defined(_GLIBCXX_LIST) || defined(__SGI_STL_LIST) -template void list_delete (std::list *l) +template LIBPBD_API void list_delete (std::list *l) { typename std::list::iterator i; @@ -62,7 +63,7 @@ template void list_delete (std::list *l) #endif // _CPP_LIST || _GLIBCXX_LIST || __SGI_STL_LIST #if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST) -template void slist_delete (std::slist *l) +template LIBPBD_API void slist_delete (std::slist *l) { typename std::slist::iterator i; @@ -75,7 +76,7 @@ template void slist_delete (std::slist *l) #endif // _CPP_SLIST || _GLIBCXX_SLIST || __SGI_STL_SLIST #if defined(_CPP_SET) || defined(_GLIBCXX_SET) || defined(__SGI_STL_SET) -template void set_delete (std::set *sset) +template void LIBPBD_API set_delete (std::set *sset) { typename std::set::iterator i; diff --git a/libs/pbd/pbd/stl_functors.h b/libs/pbd/pbd/stl_functors.h index 3c83a1ae2f..5815dacb05 100644 --- a/libs/pbd/pbd/stl_functors.h +++ b/libs/pbd/pbd/stl_functors.h @@ -22,8 +22,10 @@ #include +#include "pbd/libpbd_visibility.h" + #ifndef LESS_STRING_P -struct less { +struct LIBPBD_API less { bool operator()(std::string *s1, std::string *s2) const { return *s1 < *s2; } @@ -32,7 +34,7 @@ struct less { #endif // LESS_STRING_P #ifndef LESS_CONST_STRING_P -struct less { +struct LIBPBD_API less { bool operator()(const std::string *s1, const std::string *s2) const { return *s1 < *s2; } @@ -41,7 +43,7 @@ struct less { #endif // LESS_CONST_STRING_P #ifndef LESS_CONST_CHAR_P -struct less +struct LIBPBD_API less { bool operator()(const char* s1, const char* s2) const { return strcmp(s1, s2) < 0; @@ -51,7 +53,7 @@ struct less #endif // LESS_CONST_CHAR_P #ifndef LESS_CONST_FLOAT_P -struct less +struct LIBPBD_API less { bool operator()(const float *n1, const float *n2) const { return *n1 < *n2; @@ -61,7 +63,7 @@ struct less #endif // LESS_CONST_FLOAT_P #ifndef EQUAL_TO_CONST_CHAR_P -struct equal_to +struct LIBPBD_API equal_to { bool operator()(const char *s1, const char *s2) const { return strcmp (s1, s2) == 0; @@ -71,7 +73,7 @@ struct equal_to #endif // EQUAL_TO_CONST_CHAR_P #ifndef EQUAL_TO_STRING_P -struct equal_to +struct LIBPBD_API equal_to { bool operator()(const std::string *s1, const std::string *s2) const { return *s1 == *s2; @@ -81,7 +83,7 @@ struct equal_to #endif // EQUAL_TO_STRING_P #ifndef LESS_CONST_STRING_R -struct less { +struct LIBPBD_API less { bool operator() (const std::string &s1, const std::string &s2) { return s1 < s2; } diff --git a/libs/pbd/pbd/strsplit.h b/libs/pbd/pbd/strsplit.h index 25c4526b6a..045974d00c 100644 --- a/libs/pbd/pbd/strsplit.h +++ b/libs/pbd/pbd/strsplit.h @@ -24,7 +24,9 @@ #include #include -extern void split (std::string, std::vector&, char); -extern void split (Glib::ustring, std::vector&, char); +#include "pbd/libpbd_visibility.h" + +LIBPBD_API extern void split (std::string, std::vector&, char); +LIBPBD_API extern void split (Glib::ustring, std::vector&, char); #endif // __pbd_strplit_h__ diff --git a/libs/pbd/pbd/textreceiver.h b/libs/pbd/pbd/textreceiver.h index c9a1d0aecc..9fe7e0828d 100644 --- a/libs/pbd/pbd/textreceiver.h +++ b/libs/pbd/pbd/textreceiver.h @@ -22,9 +22,10 @@ #include +#include "pbd/libpbd_visibility.h" #include "receiver.h" -class TextReceiver : public Receiver +class LIBPBD_API TextReceiver : public Receiver { public: TextReceiver (const std::string &n); diff --git a/libs/pbd/pbd/thrown_error.h b/libs/pbd/pbd/thrown_error.h index 0a63085f11..be68be918f 100644 --- a/libs/pbd/pbd/thrown_error.h +++ b/libs/pbd/pbd/thrown_error.h @@ -19,6 +19,7 @@ #ifndef __qm_thrown_error_h__ #define __qm_thrown_error_h__ +#include "pbd/libpbd_visibility.h" #include "transmitter.h" #define SAFE_THROW(T) \ @@ -26,7 +27,7 @@ (*sent) << rdbuf(); \ throw sent -class ThrownError : public Transmitter { +class LIBPBD_API ThrownError : public Transmitter { public: ThrownError () : Transmitter (Transmitter::Throw) {} protected: diff --git a/libs/pbd/pbd/tokenizer.h b/libs/pbd/pbd/tokenizer.h index 39954194fb..b4b3b107c0 100644 --- a/libs/pbd/pbd/tokenizer.h +++ b/libs/pbd/pbd/tokenizer.h @@ -23,6 +23,7 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/whitespace.h" namespace PBD { @@ -36,7 +37,7 @@ namespace PBD { are discarded. */ template -unsigned int +LIBPBD_API unsigned int tokenize(const StringType& str, const StringType& delims, Iter it, diff --git a/libs/pbd/pbd/touchable.h b/libs/pbd/pbd/touchable.h index 12f1c443fd..ed7d75df52 100644 --- a/libs/pbd/pbd/touchable.h +++ b/libs/pbd/pbd/touchable.h @@ -19,7 +19,9 @@ #ifndef __pbd_touchable_h__ #define __pbd_touchable_h__ -class Touchable +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API Touchable { public: Touchable() : _delete_after_touch (false) {} @@ -35,7 +37,7 @@ class Touchable }; template -class DynamicTouchable : public Touchable +class LIBPBD_API DynamicTouchable : public Touchable { public: DynamicTouchable (T& t, void (T::*m)(void)) @@ -51,7 +53,7 @@ class DynamicTouchable : public Touchable }; template -class DynamicTouchable1 : public Touchable +class LIBPBD_API DynamicTouchable1 : public Touchable { public: DynamicTouchable1 (T1& t, void (T1::*m)(T2), T2 a) @@ -68,7 +70,7 @@ class DynamicTouchable1 : public Touchable }; template -class DynamicTouchable2 : public Touchable +class LIBPBD_API DynamicTouchable2 : public Touchable { public: DynamicTouchable2 (T1& t, void (T1::*m)(T2, T3), T2 a1, T3 a2) diff --git a/libs/pbd/pbd/transmitter.h b/libs/pbd/pbd/transmitter.h index 6da521dd26..d77fca8da3 100644 --- a/libs/pbd/pbd/transmitter.h +++ b/libs/pbd/pbd/transmitter.h @@ -25,7 +25,9 @@ #include -class Transmitter : public std::stringstream +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API Transmitter : public std::stringstream { public: @@ -100,6 +102,6 @@ endmsg (std::ostream &ostr) } -extern "C" { void pbd_c_error (const char *); } +extern "C" { LIBPBD_API void pbd_c_error (const char *); } #endif // __libmisc_transmitter_h__ diff --git a/libs/pbd/pbd/undo.h b/libs/pbd/pbd/undo.h index 11ff2bf321..753bc13b15 100644 --- a/libs/pbd/pbd/undo.h +++ b/libs/pbd/pbd/undo.h @@ -27,11 +27,12 @@ #include #include +#include "pbd/libpbd_visibility.h" #include "pbd/command.h" typedef sigc::slot UndoAction; -class UndoTransaction : public Command +class LIBPBD_API UndoTransaction : public Command { public: UndoTransaction (); @@ -70,7 +71,7 @@ class UndoTransaction : public Command void about_to_explicitly_delete (); }; -class UndoHistory : public PBD::ScopedConnectionList +class LIBPBD_API UndoHistory : public PBD::ScopedConnectionList { public: UndoHistory(); diff --git a/libs/pbd/pbd/unknown_type.h b/libs/pbd/pbd/unknown_type.h index 3610d4f0ed..4d984269a7 100644 --- a/libs/pbd/pbd/unknown_type.h +++ b/libs/pbd/pbd/unknown_type.h @@ -22,7 +22,9 @@ #include -class unknown_type : public std::exception { +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API unknown_type : public std::exception { public: virtual const char *what() const throw() { return "unknown type"; } }; diff --git a/libs/pbd/pbd/unwind.h b/libs/pbd/pbd/unwind.h index 6062e1f6e1..cf7998fdd4 100644 --- a/libs/pbd/pbd/unwind.h +++ b/libs/pbd/pbd/unwind.h @@ -20,10 +20,12 @@ #ifndef __libpbd_unwinder_h__ #define __libpbd_unwinder_h__ +#include "pbd/libpbd_visibility.h" + namespace PBD { template -class Unwinder { +class LIBPBD_API Unwinder { public: Unwinder (T& var, T new_val) : _var (var), _old_val (var) { var = new_val; } ~Unwinder () { _var = _old_val; } diff --git a/libs/pbd/pbd/uuid.h b/libs/pbd/pbd/uuid.h index 16a67436b7..333a902b4d 100644 --- a/libs/pbd/pbd/uuid.h +++ b/libs/pbd/pbd/uuid.h @@ -24,9 +24,11 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -class UUID { +class LIBPBD_API UUID { public: UUID () { uuid_generate (id); } diff --git a/libs/pbd/pbd/uuid_boost.h b/libs/pbd/pbd/uuid_boost.h index 275b72648a..0219603723 100644 --- a/libs/pbd/pbd/uuid_boost.h +++ b/libs/pbd/pbd/uuid_boost.h @@ -25,9 +25,11 @@ #include #include +#include "pbd/libpbd_visibility.h" + namespace PBD { -class UUID : public boost::uuids::uuid { +class LIBPBD_API UUID : public boost::uuids::uuid { public: UUID () diff --git a/libs/pbd/pbd/whitespace.h b/libs/pbd/pbd/whitespace.h index 444be112b0..5816b84cae 100644 --- a/libs/pbd/pbd/whitespace.h +++ b/libs/pbd/pbd/whitespace.h @@ -22,11 +22,13 @@ #include +#include "pbd/libpbd_visibility.h" + namespace PBD { // returns the empty string if the entire string is whitespace // so check length after calling. -extern void strip_whitespace_edges (std::string& str); + LIBPBD_API extern void strip_whitespace_edges (std::string& str); } // namespace PBD diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h index bff863e4c6..e6795e5d45 100644 --- a/libs/pbd/pbd/xml++.h +++ b/libs/pbd/pbd/xml++.h @@ -17,6 +17,9 @@ */ +#ifndef __XML_H +#define __XML_H + /* xml++.h * libxml++ and this file are copyright (C) 2000 by Ari Johnson, and * are covered by the GNU Lesser General Public License, which should be @@ -34,8 +37,7 @@ #include #include -#ifndef __XML_H -#define __XML_H +#include "pbd/libpbd_visibility.h" class XMLTree; class XMLNode; @@ -50,7 +52,7 @@ typedef XMLPropertyList::iterator XMLPropertyIterator; typedef XMLPropertyList::const_iterator XMLPropertyConstIterator; typedef std::map XMLPropertyMap; -class XMLTree { +class LIBPBD_API XMLTree { public: XMLTree(); XMLTree(const std::string& fn, bool validate = false); @@ -90,7 +92,7 @@ private: int _compression; }; -class XMLNode { +class LIBPBD_API XMLNode { public: XMLNode(const std::string& name); XMLNode(const std::string& name, const std::string& content); @@ -148,7 +150,7 @@ private: void clear_lists (); }; -class XMLProperty { +class LIBPBD_API XMLProperty { public: XMLProperty(const std::string& n, const std::string& v = std::string()); ~XMLProperty(); @@ -162,7 +164,7 @@ private: std::string _value; }; -class XMLException: public std::exception { +class LIBPBD_API XMLException: public std::exception { public: explicit XMLException(const std::string msg) : _message(msg) {} virtual ~XMLException() throw() {} diff --git a/libs/pbd/wscript b/libs/pbd/wscript index ffbe0e0d19..be68c40dbf 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -114,10 +114,15 @@ def build(bld): if bld.is_defined ('INTERNAL_SHARED_LIBS'): print('BUILD SHARED LIB') obj = bld.shlib(features = 'cxx cxxshlib', source=libpbd_sources) + obj.defines = [ 'LIBPBD_DLL=1', + 'LIBPBD_DLL_EXPORTS=1' + ] + else: print('BUILD STATIC LIB') obj = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources) obj.cxxflags = [ '-fPIC' ] + obj.defines = [] if bld.is_defined('DEBUG_RT_ALLOC'): obj.source += 'debug_rt_alloc.c' @@ -134,7 +139,7 @@ def build(bld): obj.uselib += ' OSX' obj.vnum = LIBPBD_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"'] + obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"' ] if bld.env['build_target'] == 'x86_64': obj.defines += [ 'USE_X86_64_ASM' ] From e2e057ce598f82a8d47fdb1bc498cd2a6408704b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 16 Oct 2013 23:30:52 -0400 Subject: [PATCH 02/36] make small beginning on visibility control in libardour --- libs/ardour/ardour/ardour.h | 1 + libs/ardour/ardour/libardour_visibility.h | 58 +++++++++++++++++++++++ libs/ardour/ardour/session.h | 2 +- libs/ardour/wscript | 3 +- 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 libs/ardour/ardour/libardour_visibility.h diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index 80bdf9d80e..f65725d209 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -35,6 +35,7 @@ #include "pbd/stateful.h" #include "ardour/types.h" +#include "ardour/libardour_visibility.h" #include diff --git a/libs/ardour/ardour/libardour_visibility.h b/libs/ardour/ardour/libardour_visibility.h new file mode 100644 index 0000000000..ae07961ef3 --- /dev/null +++ b/libs/ardour/ardour/libardour_visibility.h @@ -0,0 +1,58 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libardour_libardour_visibility_h__ +#define __libardour_libardour_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBARDOUR_DLL_IMPORT __declspec(dllimport) + #define LIBARDOUR_DLL_EXPORT __declspec(dllexport) + #define LIBARDOUR_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBARDOUR_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBARDOUR_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBARDOUR_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBARDOUR_DLL_IMPORT + #define LIBARDOUR_DLL_EXPORT + #define LIBARDOUR_DLL_LOCAL + #define LIBARDOUR_DLL_IMPORT_CLASS + #define LIBARDOUR_DLL_EXPORT_CLASS + #endif +#endif + +#ifdef LIBARDOUR_DLL // libardour is a DLL +#ifdef LIBARDOUR_DLL_EXPORTS // defined if we are building the libardour DLL (instead of using it) + #define LIBARDOUR_API LIBARDOUR_DLL_EXPORT +#else + #define LIBARDOUR_API LIBARDOUR_DLL_IMPORT +#endif +#define LIBARDOUR_LOCAL LIBARDOUR_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBARDOUR_API +#define LIBARDOUR_LOCAL +#endif + +#endif /* __libardour_libardour_visibility_h__ */ diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 9c4edfa1a1..0f4e04715a 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -140,7 +140,7 @@ class WindowsVSTPlugin; extern void setup_enum_writer (); -class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager +class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager { public: enum RecordState { diff --git a/libs/ardour/wscript b/libs/ardour/wscript index e91d019dd5..1adc131332 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -344,7 +344,8 @@ def build(bld): 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"', - 'EVORAL_MIDI_XML=1' + 'EVORAL_MIDI_XML=1', + 'LIBARDOUR_DLL_EXPORTS=1' ] #obj.source += ' st_stretch.cc st_pitch.cc ' From e89f129e5efc104b881b9a6d223cb0ce7cc760ae Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Oct 2013 08:47:43 -0400 Subject: [PATCH 03/36] add defines to gtk ardour build so that it knows that our internal libs are all shared --- gtk2_ardour/wscript | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 311ed6ca03..168f0c7358 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -404,7 +404,20 @@ def build(bld): obj.source = gtk2_ardour_sources obj.target = 'ardour-' + bld.env['VERSION'] obj.includes = ['.'] + obj.defines = [] + # if our internal libraries are built as DLL's, define + # the macros that activate the right stuff in headers + # for export/visibility to work on all platforms. + + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBPBD_DLL=1', + 'LIBARDOUR_DLL=1', + 'LIBMIDIPP_DLL=1', + 'LIBARDOUR_DLL=1', + 'LIBARDOUR_CP_DLL=1', + 'LIBGTKMM2EXT_DLL=1', + ] # continue with setup of obj, which could be a shared library # or an executable. @@ -422,7 +435,7 @@ def build(bld): 'libtaglib' ] if sys.platform == 'darwin': obj.use += ' libappleutility' - obj.defines = [ + obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"', 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', From a7f156e005cd6f40ddd99eec394e0db51a62ae7c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Oct 2013 09:56:43 -0400 Subject: [PATCH 04/36] new file for libmidi++ export control --- libs/midi++2/midi++/libmidi_visibility.h | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 libs/midi++2/midi++/libmidi_visibility.h diff --git a/libs/midi++2/midi++/libmidi_visibility.h b/libs/midi++2/midi++/libmidi_visibility.h new file mode 100644 index 0000000000..62eebfe8e2 --- /dev/null +++ b/libs/midi++2/midi++/libmidi_visibility.h @@ -0,0 +1,56 @@ +/* + Copyright (C) 2013 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libmidi_libmidi_visibility_h__ +#define __libmidi_libmidi_visibility_h__ + +/* _WIN32 is defined by most compilers targetting Windows, but within the + * midi source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending + * on how a Windows build is built. + */ + +#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) + #define LIBMIDIPP_DLL_IMPORT __declspec(dllimport) + #define LIBMIDIPP_DLL_EXPORT __declspec(dllexport) + #define LIBMIDIPP_DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define LIBMIDIPP_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBMIDIPP_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBMIDIPP_DLL_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define LIBMIDIPP_DLL_IMPORT + #define LIBMIDIPP_DLL_EXPORT + #define LIBMIDIPP_DLL_LOCAL + #endif +#endif + +#ifdef LIBMIDIPP_DLL // libmidi is a DLL +#ifdef LIBMIDIPP_DLL_EXPORTS // defined if we are building the libmidi DLL (instead of using it) + #define LIBMIDIPP_API LIBMIDIPP_DLL_EXPORT +#else + #define LIBMIDIPP_API LIBMIDIPP_DLL_IMPORT +#endif +#define LIBMIDIPP_LOCAL LIBMIDIPP_DLL_LOCAL +#else /* static lib, not DLL */ +#define LIBMIDIPP_API +#define LIBMIDIPP_LOCAL +#endif + +#endif /* __libmidi_libmidi_visibility_h__ */ From 24d2b5ec9200bf46ccb42528560de4a02b7be516 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Oct 2013 10:02:11 -0400 Subject: [PATCH 05/36] add export visibility macros across libardour --- libs/ardour/ardour/amp.h | 3 +- libs/ardour/ardour/analyser.h | 4 +- libs/ardour/ardour/ardour.h | 1 + libs/ardour/ardour/audio_backend.h | 5 +- libs/ardour/ardour/audio_buffer.h | 2 +- libs/ardour/ardour/audio_diskstream.h | 4 +- libs/ardour/ardour/audio_library.h | 4 +- libs/ardour/ardour/audio_playlist_importer.h | 6 +-- libs/ardour/ardour/audio_playlist_source.h | 2 +- libs/ardour/ardour/audio_port.h | 2 +- libs/ardour/ardour/audio_region_importer.h | 4 +- libs/ardour/ardour/audio_track.h | 2 +- libs/ardour/ardour/audio_track_importer.h | 4 +- libs/ardour/ardour/audio_unit.h | 10 ++-- libs/ardour/ardour/audioanalyser.h | 3 +- libs/ardour/ardour/audioengine.h | 3 +- libs/ardour/ardour/audiofile_tagger.h | 4 +- libs/ardour/ardour/audiofilesource.h | 4 +- libs/ardour/ardour/audioplaylist.h | 3 +- libs/ardour/ardour/audioregion.h | 24 ++++----- libs/ardour/ardour/audiosource.h | 2 +- libs/ardour/ardour/auditioner.h | 2 +- libs/ardour/ardour/auto_bundle.h | 2 +- libs/ardour/ardour/automatable.h | 3 +- libs/ardour/ardour/automatable_sequence.h | 2 +- libs/ardour/ardour/automation_control.h | 4 +- libs/ardour/ardour/automation_list.h | 4 +- libs/ardour/ardour/automation_watch.h | 2 +- libs/ardour/ardour/beats_frames_converter.h | 3 +- libs/ardour/ardour/broadcast_info.h | 3 +- libs/ardour/ardour/buffer.h | 3 +- libs/ardour/ardour/buffer_manager.h | 2 +- libs/ardour/ardour/buffer_set.h | 7 +-- libs/ardour/ardour/bundle.h | 4 +- libs/ardour/ardour/butler.h | 3 +- libs/ardour/ardour/caimportable.h | 3 +- libs/ardour/ardour/capturing_processor.h | 2 +- libs/ardour/ardour/chan_count.h | 2 +- libs/ardour/ardour/chan_mapping.h | 2 +- libs/ardour/ardour/click.h | 5 +- libs/ardour/ardour/comparable_shared_ptr.h | 4 +- libs/ardour/ardour/configuration.h | 2 +- libs/ardour/ardour/configuration_variable.h | 13 ++--- libs/ardour/ardour/control_protocol_manager.h | 4 +- libs/ardour/ardour/coreaudiosource.h | 2 +- libs/ardour/ardour/cycle_timer.h | 5 +- libs/ardour/ardour/data_type.h | 4 +- libs/ardour/ardour/delivery.h | 3 +- libs/ardour/ardour/diskstream.h | 3 +- libs/ardour/ardour/element_import_handler.h | 7 ++- libs/ardour/ardour/element_importer.h | 3 +- libs/ardour/ardour/event_type_map.h | 4 +- libs/ardour/ardour/export_channel.h | 10 ++-- .../ardour/export_channel_configuration.h | 2 +- libs/ardour/ardour/export_failed.h | 4 +- libs/ardour/ardour/export_filename.h | 2 +- libs/ardour/ardour/export_format_base.h | 3 +- .../ardour/export_format_compatibility.h | 2 +- libs/ardour/ardour/export_format_manager.h | 2 +- .../ardour/export_format_specification.h | 3 +- libs/ardour/ardour/export_formats.h | 14 ++--- libs/ardour/ardour/export_graph_builder.h | 2 +- libs/ardour/ardour/export_handler.h | 5 +- libs/ardour/ardour/export_pointers.h | 1 + libs/ardour/ardour/export_preset.h | 4 +- libs/ardour/ardour/export_profile_manager.h | 3 +- libs/ardour/ardour/export_status.h | 3 +- libs/ardour/ardour/export_timespan.h | 3 +- libs/ardour/ardour/file_source.h | 4 +- libs/ardour/ardour/filter.h | 3 +- libs/ardour/ardour/graph.h | 3 +- libs/ardour/ardour/graphnode.h | 2 +- libs/ardour/ardour/iec1ppmdsp.h | 3 +- libs/ardour/ardour/iec2ppmdsp.h | 3 +- libs/ardour/ardour/import_status.h | 3 +- libs/ardour/ardour/importable_source.h | 3 +- libs/ardour/ardour/instrument_info.h | 15 +++--- libs/ardour/ardour/internal_return.h | 2 +- libs/ardour/ardour/internal_send.h | 2 +- libs/ardour/ardour/interpolation.h | 7 +-- libs/ardour/ardour/interthread_info.h | 1 + libs/ardour/ardour/io.h | 3 +- libs/ardour/ardour/io_processor.h | 2 +- libs/ardour/ardour/kmeterdsp.h | 4 +- libs/ardour/ardour/ladspa_plugin.h | 4 +- libs/ardour/ardour/latent.h | 3 +- libs/ardour/ardour/libardour_visibility.h | 2 - libs/ardour/ardour/location.h | 4 +- libs/ardour/ardour/location_importer.h | 4 +- libs/ardour/ardour/logcurve.h | 6 +-- libs/ardour/ardour/lv2_plugin.h | 4 +- libs/ardour/ardour/lxvst_plugin.h | 6 +-- libs/ardour/ardour/meter.h | 5 +- .../ardour/midi_automation_list_binder.h | 2 +- libs/ardour/ardour/midi_buffer.h | 2 +- libs/ardour/ardour/midi_diskstream.h | 4 +- libs/ardour/ardour/midi_model.h | 4 +- libs/ardour/ardour/midi_operator.h | 2 +- libs/ardour/ardour/midi_patch_manager.h | 2 +- libs/ardour/ardour/midi_playlist.h | 2 +- libs/ardour/ardour/midi_playlist_source.h | 2 +- libs/ardour/ardour/midi_port.h | 2 +- libs/ardour/ardour/midi_region.h | 3 +- libs/ardour/ardour/midi_ring_buffer.h | 3 +- libs/ardour/ardour/midi_source.h | 3 +- libs/ardour/ardour/midi_state_tracker.h | 3 +- libs/ardour/ardour/midi_stretch.h | 2 +- libs/ardour/ardour/midi_track.h | 2 +- libs/ardour/ardour/midi_ui.h | 4 +- libs/ardour/ardour/midiport_manager.h | 3 +- libs/ardour/ardour/mix.h | 1 + libs/ardour/ardour/monitor_processor.h | 5 +- libs/ardour/ardour/movable.h | 2 +- libs/ardour/ardour/mtdm.h | 4 +- libs/ardour/ardour/mute_master.h | 2 +- libs/ardour/ardour/onset_detector.h | 2 +- libs/ardour/ardour/pan_controllable.h | 2 +- libs/ardour/ardour/pannable.h | 2 +- libs/ardour/ardour/panner.h | 5 +- libs/ardour/ardour/panner_manager.h | 4 +- libs/ardour/ardour/panner_shell.h | 3 +- libs/ardour/ardour/peak.h | 1 + libs/ardour/ardour/pi_controller.h | 5 +- libs/ardour/ardour/pitch.h | 4 +- libs/ardour/ardour/playlist.h | 4 +- libs/ardour/ardour/playlist_factory.h | 2 +- libs/ardour/ardour/playlist_source.h | 2 +- libs/ardour/ardour/plugin.h | 5 +- libs/ardour/ardour/plugin_insert.h | 3 +- libs/ardour/ardour/plugin_manager.h | 3 +- libs/ardour/ardour/port.h | 3 +- libs/ardour/ardour/port_engine.h | 3 +- libs/ardour/ardour/port_insert.h | 3 +- libs/ardour/ardour/port_manager.h | 2 +- libs/ardour/ardour/port_set.h | 2 +- libs/ardour/ardour/process_thread.h | 3 +- libs/ardour/ardour/processor.h | 3 +- libs/ardour/ardour/profile.h | 4 +- libs/ardour/ardour/progress.h | 4 +- libs/ardour/ardour/proxy_controllable.h | 2 +- libs/ardour/ardour/public_diskstream.h | 2 +- libs/ardour/ardour/quantize.h | 3 +- libs/ardour/ardour/rb_effect.h | 2 +- libs/ardour/ardour/rc_configuration.h | 3 +- libs/ardour/ardour/readable.h | 3 +- libs/ardour/ardour/region.h | 5 +- libs/ardour/ardour/region_factory.h | 3 +- libs/ardour/ardour/region_sorters.h | 4 +- libs/ardour/ardour/resampled_source.h | 3 +- libs/ardour/ardour/return.h | 2 +- libs/ardour/ardour/reverse.h | 2 +- libs/ardour/ardour/route.h | 3 +- libs/ardour/ardour/route_graph.h | 2 +- libs/ardour/ardour/route_group.h | 3 +- libs/ardour/ardour/route_group_member.h | 2 +- libs/ardour/ardour/runtime_functions.h | 1 + libs/ardour/ardour/send.h | 2 +- libs/ardour/ardour/session.h | 2 +- libs/ardour/ardour/session_configuration.h | 2 +- libs/ardour/ardour/session_directory.h | 4 +- libs/ardour/ardour/session_event.h | 5 +- libs/ardour/ardour/session_handle.h | 6 ++- libs/ardour/ardour/session_metadata.h | 4 +- libs/ardour/ardour/session_object.h | 2 +- libs/ardour/ardour/session_playlists.h | 2 +- libs/ardour/ardour/silentfilesource.h | 2 +- libs/ardour/ardour/slave.h | 19 +++---- libs/ardour/ardour/smf_source.h | 2 +- libs/ardour/ardour/sndfileimportable.h | 3 +- libs/ardour/ardour/sndfilesource.h | 2 +- libs/ardour/ardour/soundseq.h | 6 +-- libs/ardour/ardour/source.h | 2 +- libs/ardour/ardour/source_factory.h | 2 +- libs/ardour/ardour/speaker.h | 4 +- libs/ardour/ardour/speakers.h | 2 +- libs/ardour/ardour/spline.h | 4 +- libs/ardour/ardour/stretch.h | 4 +- libs/ardour/ardour/strip_silence.h | 2 +- libs/ardour/ardour/tape_file_matcher.h | 4 +- libs/ardour/ardour/tempo.h | 14 ++--- libs/ardour/ardour/tempo_map_importer.h | 4 +- libs/ardour/ardour/thread_buffers.h | 3 +- libs/ardour/ardour/ticker.h | 3 +- libs/ardour/ardour/track.h | 2 +- libs/ardour/ardour/transient_detector.h | 2 +- libs/ardour/ardour/trimmable.h | 2 +- libs/ardour/ardour/unknown_processor.h | 2 +- libs/ardour/ardour/uri_map.h | 4 +- libs/ardour/ardour/user_bundle.h | 2 +- libs/ardour/ardour/utils.h | 51 ++++++++++--------- libs/ardour/ardour/vst_plugin.h | 8 +-- libs/ardour/ardour/vst_types.h | 9 ++-- libs/ardour/ardour/vumeterdsp.h | 3 +- libs/ardour/ardour/windows_vst_plugin.h | 6 +-- libs/ardour/ardour/worker.h | 6 ++- libs/ardour/cycle_timer.cc | 2 + libs/ardour/element_import_handler.cc | 1 + libs/ardour/export_filename.cc | 5 +- libs/ardour/route_group_member.cc | 1 + libs/pbd/pbd/fastlog.h | 8 +-- libs/pbd/pbd/floating.h | 2 +- libs/pbd/pbd/memento_command.h | 12 ++--- libs/pbd/pbd/stateful_diff_command.h | 4 +- 203 files changed, 455 insertions(+), 335 deletions(-) diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index e21cf62d62..f6a15666e9 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -19,6 +19,7 @@ #ifndef __ardour_amp_h__ #define __ardour_amp_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/processor.h" @@ -32,7 +33,7 @@ class IO; /** Applies a declick operation to all audio inputs, passing the same number of * audio outputs, and passing through any other types unchanged. */ -class Amp : public Processor { +class LIBARDOUR_API Amp : public Processor { public: Amp(Session& s); diff --git a/libs/ardour/ardour/analyser.h b/libs/ardour/ardour/analyser.h index 51adea67b9..cef71186cc 100644 --- a/libs/ardour/ardour/analyser.h +++ b/libs/ardour/ardour/analyser.h @@ -23,13 +23,15 @@ #include #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class AudioFileSource; class Source; class TransientDetector; -class Analyser { +class LIBARDOUR_API Analyser { public: Analyser(); diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index f65725d209..fa525ed2d8 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -34,6 +34,7 @@ #include "pbd/locale_guard.h" #include "pbd/stateful.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/libardour_visibility.h" diff --git a/libs/ardour/ardour/audio_backend.h b/libs/ardour/ardour/audio_backend.h index cbe0bfce50..175fc5bbf3 100644 --- a/libs/ardour/ardour/audio_backend.h +++ b/libs/ardour/ardour/audio_backend.h @@ -28,6 +28,7 @@ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/audioengine.h" #include "ardour/port_engine.h" @@ -42,7 +43,7 @@ namespace ARDOUR { -class AudioBackend : public PortEngine { +class LIBARDOUR_API AudioBackend : public PortEngine { public: AudioBackend (AudioEngine& e) : PortEngine (e), engine (e) {} @@ -461,7 +462,7 @@ class AudioBackend : public PortEngine { AudioEngine& engine; }; -struct AudioBackendInfo { +struct LIBARDOUR_API AudioBackendInfo { const char* name; /** Using arg1 and arg2, initialize this audiobackend. diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h index 42aba607f9..58157a7919 100644 --- a/libs/ardour/ardour/audio_buffer.h +++ b/libs/ardour/ardour/audio_buffer.h @@ -27,7 +27,7 @@ namespace ARDOUR { /** Buffer containing audio data. */ -class AudioBuffer : public Buffer +class LIBARDOUR_API AudioBuffer : public Buffer { public: AudioBuffer(size_t capacity); diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index 5a856e9b36..cb0b5a129f 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -42,7 +42,7 @@ #include "ardour/port.h" #include "ardour/interpolation.h" -struct tm; +struct LIBARDOUR_API tm; namespace ARDOUR { @@ -53,7 +53,7 @@ class AudioPlaylist; class AudioFileSource; class IO; -class AudioDiskstream : public Diskstream +class LIBARDOUR_API AudioDiskstream : public Diskstream { public: AudioDiskstream (Session &, const std::string& name, Diskstream::Flag f = Recordable); diff --git a/libs/ardour/ardour/audio_library.h b/libs/ardour/ardour/audio_library.h index 2009ec39a7..cd9b38e9dc 100644 --- a/libs/ardour/ardour/audio_library.h +++ b/libs/ardour/ardour/audio_library.h @@ -24,9 +24,11 @@ #include #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class AudioLibrary +class LIBARDOUR_API AudioLibrary { public: AudioLibrary (); diff --git a/libs/ardour/ardour/audio_playlist_importer.h b/libs/ardour/ardour/audio_playlist_importer.h index 011bfe39b8..a6d68b9c73 100644 --- a/libs/ardour/ardour/audio_playlist_importer.h +++ b/libs/ardour/ardour/audio_playlist_importer.h @@ -38,7 +38,7 @@ class AudioRegionImporter; class AudioPlaylistImporter; class Session; -class AudioPlaylistImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioPlaylistImportHandler : public ElementImportHandler { public: typedef boost::shared_ptr PlaylistPtr; @@ -57,7 +57,7 @@ class AudioPlaylistImportHandler : public ElementImportHandler AudioRegionImportHandler & region_handler; }; -class UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler +class LIBARDOUR_API UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler { public: UnusedAudioPlaylistImportHandler (XMLTree const & source, Session & session, AudioRegionImportHandler & region_handler) : @@ -65,7 +65,7 @@ class UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler std::string get_info () const; }; -class AudioPlaylistImporter : public ElementImporter +class LIBARDOUR_API AudioPlaylistImporter : public ElementImporter { public: AudioPlaylistImporter (XMLTree const & source, Session & session, AudioPlaylistImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/audio_playlist_source.h b/libs/ardour/ardour/audio_playlist_source.h index c2e1e87f75..6a586fc30d 100644 --- a/libs/ardour/ardour/audio_playlist_source.h +++ b/libs/ardour/ardour/audio_playlist_source.h @@ -32,7 +32,7 @@ namespace ARDOUR { class AudioPlaylist; -class AudioPlaylistSource : public PlaylistSource, public AudioSource { +class LIBARDOUR_API AudioPlaylistSource : public PlaylistSource, public AudioSource { public: virtual ~AudioPlaylistSource (); diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h index f87b134e9e..ca5f183a13 100644 --- a/libs/ardour/ardour/audio_port.h +++ b/libs/ardour/ardour/audio_port.h @@ -26,7 +26,7 @@ namespace ARDOUR { -class AudioPort : public Port +class LIBARDOUR_API AudioPort : public Port { public: ~AudioPort (); diff --git a/libs/ardour/ardour/audio_region_importer.h b/libs/ardour/ardour/audio_region_importer.h index b3bcb05668..d1a965a5ee 100644 --- a/libs/ardour/ardour/audio_region_importer.h +++ b/libs/ardour/ardour/audio_region_importer.h @@ -39,7 +39,7 @@ class Region; class Session; class Source; -class AudioRegionImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioRegionImportHandler : public ElementImportHandler { public: // Inerface implementation @@ -69,7 +69,7 @@ class AudioRegionImportHandler : public ElementImportHandler IdMap id_map; }; -class AudioRegionImporter : public ElementImporter +class LIBARDOUR_API AudioRegionImporter : public ElementImporter { public: AudioRegionImporter (XMLTree const & source, Session & session, AudioRegionImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index ada58e8ebe..1ecec88f89 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -31,7 +31,7 @@ class AudioPlaylist; class RouteGroup; class AudioFileSource; -class AudioTrack : public Track +class LIBARDOUR_API AudioTrack : public Track { public: AudioTrack (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); diff --git a/libs/ardour/ardour/audio_track_importer.h b/libs/ardour/ardour/audio_track_importer.h index 683417de24..58789177e3 100644 --- a/libs/ardour/ardour/audio_track_importer.h +++ b/libs/ardour/ardour/audio_track_importer.h @@ -34,7 +34,7 @@ namespace ARDOUR { class AudioPlaylistImportHandler; class AudioPlaylistImporter; -class AudioTrackImportHandler : public ElementImportHandler +class LIBARDOUR_API AudioTrackImportHandler : public ElementImportHandler { public: AudioTrackImportHandler (XMLTree const & source, Session & session, AudioPlaylistImportHandler & pl_handler); @@ -46,7 +46,7 @@ class AudioTrackImportHandler : public ElementImportHandler }; -class AudioTrackImporter : public ElementImporter +class LIBARDOUR_API AudioTrackImporter : public ElementImporter { public: AudioTrackImporter (XMLTree const & source, diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h index 007390b34a..07f41f5526 100644 --- a/libs/ardour/ardour/audio_unit.h +++ b/libs/ardour/ardour/audio_unit.h @@ -41,14 +41,14 @@ class CAComponent; class CAAudioUnit; class CAComponentDescription; -struct AudioBufferList; +struct LIBARDOUR_API AudioBufferList; namespace ARDOUR { class AudioEngine; class Session; -struct AUParameterDescriptor : public Plugin::ParameterDescriptor { +struct LIBARDOUR_API AUParameterDescriptor : public Plugin::ParameterDescriptor { // additional fields to make operations more efficient AudioUnitParameterID id; AudioUnitScope scope; @@ -58,7 +58,7 @@ struct AUParameterDescriptor : public Plugin::ParameterDescriptor { AudioUnitParameterUnit unit; }; -class AUPlugin : public ARDOUR::Plugin +class LIBARDOUR_API AUPlugin : public ARDOUR::Plugin { public: AUPlugin (AudioEngine& engine, Session& session, boost::shared_ptr comp); @@ -221,11 +221,11 @@ class AUPlugin : public ARDOUR::Plugin typedef boost::shared_ptr AUPluginPtr; -struct AUPluginCachedInfo { +struct LIBARDOUR_API AUPluginCachedInfo { std::vector > io_configs; }; -class AUPluginInfo : public PluginInfo { +class LIBARDOUR_API AUPluginInfo : public PluginInfo { public: AUPluginInfo (boost::shared_ptr); ~AUPluginInfo (); diff --git a/libs/ardour/ardour/audioanalyser.h b/libs/ardour/ardour/audioanalyser.h index 035390e99f..6a9738eb5a 100644 --- a/libs/ardour/ardour/audioanalyser.h +++ b/libs/ardour/ardour/audioanalyser.h @@ -26,6 +26,7 @@ #include #include #include "vamp-sdk/Plugin.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -33,7 +34,7 @@ namespace ARDOUR { class Readable; class Session; -class AudioAnalyser : public boost::noncopyable { +class LIBARDOUR_API AudioAnalyser : public boost::noncopyable { public: typedef Vamp::Plugin AnalysisPlugin; diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h index d5dcbffe2b..e769b9eec1 100644 --- a/libs/ardour/ardour/audioengine.h +++ b/libs/ardour/ardour/audioengine.h @@ -39,6 +39,7 @@ #include "ardour/ardour.h" #include "ardour/data_type.h" #include "ardour/session_handle.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/port_manager.h" @@ -59,7 +60,7 @@ class ProcessThread; class AudioBackend; class AudioBackendInfo; -class AudioEngine : public SessionHandlePtr, public PortManager +class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager { public: diff --git a/libs/ardour/ardour/audiofile_tagger.h b/libs/ardour/ardour/audiofile_tagger.h index 0519e2233c..9b24ffade3 100644 --- a/libs/ardour/ardour/audiofile_tagger.h +++ b/libs/ardour/ardour/audiofile_tagger.h @@ -27,13 +27,15 @@ #include "taglib/taglib.h" #include "taglib/xiphcomment.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class SessionMetadata; /// Class with static functions for tagging audiofiles -class AudiofileTagger +class LIBARDOUR_API AudiofileTagger { public: diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h index c5fd7b3af2..723c734a49 100644 --- a/libs/ardour/ardour/audiofilesource.h +++ b/libs/ardour/ardour/audiofilesource.h @@ -27,7 +27,7 @@ namespace ARDOUR { -struct SoundFileInfo { +struct LIBARDOUR_API SoundFileInfo { float samplerate; uint16_t channels; int64_t length; @@ -35,7 +35,7 @@ struct SoundFileInfo { int64_t timecode; }; -class AudioFileSource : public AudioSource, public FileSource { +class LIBARDOUR_API AudioFileSource : public AudioSource, public FileSource { public: virtual ~AudioFileSource (); diff --git a/libs/ardour/ardour/audioplaylist.h b/libs/ardour/ardour/audioplaylist.h index 478d4872cd..c3d10b6030 100644 --- a/libs/ardour/ardour/audioplaylist.h +++ b/libs/ardour/ardour/audioplaylist.h @@ -32,10 +32,9 @@ class Session; class Region; class AudioRegion; class Source; - class AudioPlaylist; -class AudioPlaylist : public ARDOUR::Playlist +class LIBARDOUR_API AudioPlaylist : public ARDOUR::Playlist { public: AudioPlaylist (Session&, const XMLNode&, bool hidden = false); diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index 83cd227bce..a6cd22895c 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -40,17 +40,17 @@ class PlaylistReadTest; namespace ARDOUR { namespace Properties { - extern PBD::PropertyDescriptor envelope_active; - extern PBD::PropertyDescriptor default_fade_in; - extern PBD::PropertyDescriptor default_fade_out; - extern PBD::PropertyDescriptor fade_in_active; - extern PBD::PropertyDescriptor fade_out_active; - extern PBD::PropertyDescriptor scale_amplitude; - extern PBD::PropertyDescriptor > fade_in; - extern PBD::PropertyDescriptor > inverse_fade_in; - extern PBD::PropertyDescriptor > fade_out; - extern PBD::PropertyDescriptor > inverse_fade_out; - extern PBD::PropertyDescriptor > envelope; + LIBARDOUR_API extern PBD::PropertyDescriptor envelope_active; + LIBARDOUR_API extern PBD::PropertyDescriptor default_fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor default_fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor fade_in_active; + LIBARDOUR_API extern PBD::PropertyDescriptor fade_out_active; + LIBARDOUR_API extern PBD::PropertyDescriptor scale_amplitude; + LIBARDOUR_API extern PBD::PropertyDescriptor > fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor > inverse_fade_in; + LIBARDOUR_API extern PBD::PropertyDescriptor > fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor > inverse_fade_out; + LIBARDOUR_API extern PBD::PropertyDescriptor > envelope; } class Playlist; @@ -59,7 +59,7 @@ class Filter; class AudioSource; -class AudioRegion : public Region +class LIBARDOUR_API AudioRegion : public Region { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index d5c85a6bf8..910e03170d 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -38,7 +38,7 @@ namespace ARDOUR { -class AudioSource : virtual public Source, +class LIBARDOUR_API AudioSource : virtual public Source, public ARDOUR::Readable, public boost::enable_shared_from_this { diff --git a/libs/ardour/ardour/auditioner.h b/libs/ardour/ardour/auditioner.h index bdd04fcc66..0b04ab711d 100644 --- a/libs/ardour/ardour/auditioner.h +++ b/libs/ardour/ardour/auditioner.h @@ -33,7 +33,7 @@ class Session; class AudioRegion; class AudioPlaylist; -class Auditioner : public AudioTrack +class LIBARDOUR_API Auditioner : public AudioTrack { public: Auditioner (Session&); diff --git a/libs/ardour/ardour/auto_bundle.h b/libs/ardour/ardour/auto_bundle.h index d97080c089..703aa8e73d 100644 --- a/libs/ardour/ardour/auto_bundle.h +++ b/libs/ardour/ardour/auto_bundle.h @@ -26,7 +26,7 @@ namespace ARDOUR { -class AutoBundle : public Bundle { +class LIBARDOUR_API AutoBundle : public Bundle { public: AutoBundle (bool i = true); diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h index b10b8eb2bc..11fb48904c 100644 --- a/libs/ardour/ardour/automatable.h +++ b/libs/ardour/ardour/automatable.h @@ -26,6 +26,7 @@ #include #include "pbd/signals.h" #include "evoral/ControlSet.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -38,7 +39,7 @@ class AutomationControl; /* The inherited ControlSet is virtual because AutomatableSequence inherits * from this AND EvoralSequence, which is also a ControlSet */ -class Automatable : virtual public Evoral::ControlSet +class LIBARDOUR_API Automatable : virtual public Evoral::ControlSet { public: Automatable(Session&); diff --git a/libs/ardour/ardour/automatable_sequence.h b/libs/ardour/ardour/automatable_sequence.h index 730ea33a7c..82a1d367e8 100644 --- a/libs/ardour/ardour/automatable_sequence.h +++ b/libs/ardour/ardour/automatable_sequence.h @@ -27,7 +27,7 @@ namespace ARDOUR { /** Contains notes and controllers */ template -class AutomatableSequence : public Automatable, public Evoral::Sequence { +class LIBARDOUR_API AutomatableSequence : public Automatable, public Evoral::Sequence { public: AutomatableSequence(Session& s) : Evoral::ControlSet() diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 10194b3f9b..aeee9dab30 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -26,6 +26,8 @@ #include "pbd/controllable.h" #include "evoral/Control.hpp" + +#include "ardour/libardour_visibility.h" #include "ardour/automation_list.h" namespace ARDOUR { @@ -36,7 +38,7 @@ class Automatable; /** A PBD::Controllable with associated automation data (AutomationList) */ -class AutomationControl : public PBD::Controllable, public Evoral::Control, public boost::enable_shared_from_this +class LIBARDOUR_API AutomationControl : public PBD::Controllable, public Evoral::Control, public boost::enable_shared_from_this { public: AutomationControl(ARDOUR::Session&, diff --git a/libs/ardour/ardour/automation_list.h b/libs/ardour/ardour/automation_list.h index 71eddda6dd..6e7b0007cd 100644 --- a/libs/ardour/ardour/automation_list.h +++ b/libs/ardour/ardour/automation_list.h @@ -40,7 +40,7 @@ namespace ARDOUR { class AutomationList; /** A SharedStatefulProperty for AutomationLists */ -class AutomationListProperty : public PBD::SharedStatefulProperty +class LIBARDOUR_API AutomationListProperty : public PBD::SharedStatefulProperty { public: AutomationListProperty (PBD::PropertyDescriptor > d, Ptr p) @@ -59,7 +59,7 @@ private: AutomationListProperty& operator= (AutomationListProperty const &); }; -class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlList +class LIBARDOUR_API AutomationList : public PBD::StatefulDestructible, public Evoral::ControlList { public: AutomationList (Evoral::Parameter id); diff --git a/libs/ardour/ardour/automation_watch.h b/libs/ardour/ardour/automation_watch.h index f3e343468d..db6474c062 100644 --- a/libs/ardour/ardour/automation_watch.h +++ b/libs/ardour/ardour/automation_watch.h @@ -30,7 +30,7 @@ namespace ARDOUR { class AutomationControl; -class AutomationWatch : public sigc::trackable, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList { +class LIBARDOUR_API AutomationWatch : public sigc::trackable, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList { public: static AutomationWatch& instance(); diff --git a/libs/ardour/ardour/beats_frames_converter.h b/libs/ardour/ardour/beats_frames_converter.h index e331b8411d..2e170d278a 100644 --- a/libs/ardour/ardour/beats_frames_converter.h +++ b/libs/ardour/ardour/beats_frames_converter.h @@ -20,6 +20,7 @@ */ #include "evoral/TimeConverter.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #ifndef __ardour_beats_frames_converter_h__ @@ -33,7 +34,7 @@ class TempoMap; * from some origin (supplied to the constructor in frames), and converts * them to the opposite unit, taking tempo changes into account. */ -class BeatsFramesConverter : public Evoral::TimeConverter { +class LIBARDOUR_API BeatsFramesConverter : public Evoral::TimeConverter { public: BeatsFramesConverter (TempoMap& tempo_map, framepos_t origin) : Evoral::TimeConverter (origin) diff --git a/libs/ardour/ardour/broadcast_info.h b/libs/ardour/ardour/broadcast_info.h index 0e87d6e6df..97f86dd133 100644 --- a/libs/ardour/ardour/broadcast_info.h +++ b/libs/ardour/ardour/broadcast_info.h @@ -23,6 +23,7 @@ #include +#include "ardour/libardour_visibility.h" #include "audiographer/broadcast_info.h" namespace ARDOUR @@ -30,7 +31,7 @@ namespace ARDOUR class Session; -class BroadcastInfo : public AudioGrapher::BroadcastInfo +class LIBARDOUR_API BroadcastInfo : public AudioGrapher::BroadcastInfo { public: BroadcastInfo (); diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h index cbb92e7c4a..479d739be0 100644 --- a/libs/ardour/ardour/buffer.h +++ b/libs/ardour/ardour/buffer.h @@ -23,6 +23,7 @@ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/data_type.h" @@ -38,7 +39,7 @@ namespace ARDOUR { * * To actually read/write buffer contents, use the appropriate derived class. */ -class Buffer : public boost::noncopyable +class LIBARDOUR_API Buffer : public boost::noncopyable { public: virtual ~Buffer() {} diff --git a/libs/ardour/ardour/buffer_manager.h b/libs/ardour/ardour/buffer_manager.h index fccd981fba..f5a3935ead 100644 --- a/libs/ardour/ardour/buffer_manager.h +++ b/libs/ardour/ardour/buffer_manager.h @@ -32,7 +32,7 @@ namespace ARDOUR { class ThreadBuffers; -class BufferManager +class LIBARDOUR_API BufferManager { public: static void init (uint32_t); diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 26d47682af..f04e380ed3 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -27,13 +27,14 @@ #include #include "ardour/chan_count.h" #include "ardour/data_type.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #if defined VST_SUPPORT || defined LXVST_SUPPORT #include "evoral/MIDIEvent.hpp" -struct _VstEvents; +struct LIBARDOUR_API _VstEvents; typedef struct _VstEvents VstEvents; -struct _VstMidiEvent; +struct LIBARDOUR_API _VstMidiEvent; typedef struct _VstMidiEvent VstMidiEvent; #endif @@ -61,7 +62,7 @@ class PortSet; * others the form of their output (eg what they did to the BufferSet). * Setting the use counts is realtime safe. */ -class BufferSet +class LIBARDOUR_API BufferSet { public: BufferSet(); diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h index 02845481b6..ef2247f12b 100644 --- a/libs/ardour/ardour/bundle.h +++ b/libs/ardour/ardour/bundle.h @@ -40,7 +40,7 @@ class AudioEngine; * `Channel' is a rather overloaded term but I can't think of a better * one right now. */ -class Bundle : public PBD::ScopedConnectionList +class LIBARDOUR_API Bundle : public PBD::ScopedConnectionList { public: @@ -149,7 +149,7 @@ class Bundle : public PBD::ScopedConnectionList Change _pending_change; }; -class BundleChannel +class LIBARDOUR_API BundleChannel { public: BundleChannel () : channel (-1) {} diff --git a/libs/ardour/ardour/butler.h b/libs/ardour/ardour/butler.h index cdd48c3e3a..21af5fb691 100644 --- a/libs/ardour/ardour/butler.h +++ b/libs/ardour/ardour/butler.h @@ -24,6 +24,7 @@ #include "pbd/ringbuffer.h" #include "pbd/pool.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_handle.h" @@ -36,7 +37,7 @@ namespace ARDOUR { * are empty they are deleted. */ -class Butler : public SessionHandleRef +class LIBARDOUR_API Butler : public SessionHandleRef { public: Butler (Session& session); diff --git a/libs/ardour/ardour/caimportable.h b/libs/ardour/ardour/caimportable.h index 1ed8676ee6..211329b8c6 100644 --- a/libs/ardour/ardour/caimportable.h +++ b/libs/ardour/ardour/caimportable.h @@ -21,6 +21,7 @@ #define __ardour_ca_importable_source_h__ #include "pbd/failed_constructor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" @@ -28,7 +29,7 @@ namespace ARDOUR { -class CAImportableSource : public ImportableSource { +class LIBARDOUR_API CAImportableSource : public ImportableSource { public: CAImportableSource (const std::string& path); virtual ~CAImportableSource(); diff --git a/libs/ardour/ardour/capturing_processor.h b/libs/ardour/ardour/capturing_processor.h index 5b9ea51557..9a91e6d02f 100644 --- a/libs/ardour/ardour/capturing_processor.h +++ b/libs/ardour/ardour/capturing_processor.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class CapturingProcessor : public Processor +class LIBARDOUR_API CapturingProcessor : public Processor { public: CapturingProcessor (Session & session); diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h index c4f3caef6b..11fb6fea9d 100644 --- a/libs/ardour/ardour/chan_count.h +++ b/libs/ardour/ardour/chan_count.h @@ -34,7 +34,7 @@ namespace ARDOUR { * Operators are defined so this may safely be used as if it were a simple * (single-typed) integer count of channels. */ -class ChanCount { +class LIBARDOUR_API ChanCount { public: ChanCount(const XMLNode& node); ChanCount() { reset(); } diff --git a/libs/ardour/ardour/chan_mapping.h b/libs/ardour/ardour/chan_mapping.h index 5b63844f66..ebb7be402a 100644 --- a/libs/ardour/ardour/chan_mapping.h +++ b/libs/ardour/ardour/chan_mapping.h @@ -34,7 +34,7 @@ namespace ARDOUR { /** A mapping from one set of channels to another * (e.g. how to 'connect' two BufferSets). */ -class ChanMapping { +class LIBARDOUR_API ChanMapping { public: ChanMapping() {} ChanMapping(ARDOUR::ChanCount identity); diff --git a/libs/ardour/ardour/click.h b/libs/ardour/ardour/click.h index 1047540a74..7fc6d21f73 100644 --- a/libs/ardour/ardour/click.h +++ b/libs/ardour/ardour/click.h @@ -23,12 +23,13 @@ #include #include "pbd/pool.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/io.h" namespace ARDOUR { -class Click { +class LIBARDOUR_API Click { public: framepos_t start; framecnt_t duration; @@ -49,7 +50,7 @@ private: static Pool pool; }; -class ClickIO : public IO +class LIBARDOUR_API ClickIO : public IO { public: ClickIO (Session& s, const std::string& name) : IO (s, name, IO::Output) {} diff --git a/libs/ardour/ardour/comparable_shared_ptr.h b/libs/ardour/ardour/comparable_shared_ptr.h index 5ff19af419..0aaacd6659 100644 --- a/libs/ardour/ardour/comparable_shared_ptr.h +++ b/libs/ardour/ardour/comparable_shared_ptr.h @@ -21,10 +21,12 @@ #ifndef __ardour_comparable_shared_ptr_h__ #define __ardour_comparable_shared_ptr_h__ +#include "ardour/libardour_visibility.h" + namespace ARDOUR { template -class ComparableSharedPtr : public boost::shared_ptr +class LIBARDOUR_API ComparableSharedPtr : public boost::shared_ptr , public boost::less_than_comparable > { public: diff --git a/libs/ardour/ardour/configuration.h b/libs/ardour/ardour/configuration.h index 14a43e160c..f8e512e458 100644 --- a/libs/ardour/ardour/configuration.h +++ b/libs/ardour/ardour/configuration.h @@ -29,7 +29,7 @@ class XMLNode; namespace ARDOUR { -class Configuration : public PBD::Stateful +class LIBARDOUR_API Configuration : public PBD::Stateful { public: Configuration(); diff --git a/libs/ardour/ardour/configuration_variable.h b/libs/ardour/ardour/configuration_variable.h index a7fe8def48..a126264929 100644 --- a/libs/ardour/ardour/configuration_variable.h +++ b/libs/ardour/ardour/configuration_variable.h @@ -25,12 +25,13 @@ #include "pbd/xml++.h" #include "pbd/convert.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" namespace ARDOUR { -class ConfigVariableBase { +class LIBARDOUR_API ConfigVariableBase { public: ConfigVariableBase (std::string str) : _name (str) {} @@ -51,7 +52,7 @@ class ConfigVariableBase { }; template -class ConfigVariable : public ConfigVariableBase +class LIBARDOUR_API ConfigVariable : public ConfigVariableBase { public: @@ -91,7 +92,7 @@ class ConfigVariable : public ConfigVariableBase /** Specialisation of ConfigVariable for std::string to cope with whitespace properly */ template<> -class ConfigVariable : public ConfigVariableBase +class LIBARDOUR_API ConfigVariable : public ConfigVariableBase { public: @@ -126,7 +127,7 @@ class ConfigVariable : public ConfigVariableBase }; template<> -class ConfigVariable : public ConfigVariableBase +class LIBARDOUR_API ConfigVariable : public ConfigVariableBase { public: @@ -163,7 +164,7 @@ class ConfigVariable : public ConfigVariableBase }; template -class ConfigVariableWithMutation : public ConfigVariable +class LIBARDOUR_API ConfigVariableWithMutation : public ConfigVariable { public: ConfigVariableWithMutation (std::string name, T val, T (*m)(T)) @@ -192,7 +193,7 @@ class ConfigVariableWithMutation : public ConfigVariable }; template<> -class ConfigVariableWithMutation : public ConfigVariable +class LIBARDOUR_API ConfigVariableWithMutation : public ConfigVariable { public: ConfigVariableWithMutation (std::string name, std::string val, std::string (*m)(std::string)) diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h index 519c762eee..98494476f9 100644 --- a/libs/ardour/ardour/control_protocol_manager.h +++ b/libs/ardour/ardour/control_protocol_manager.h @@ -35,7 +35,7 @@ class ControlProtocol; class ControlProtocolDescriptor; class Session; -class ControlProtocolInfo { +class LIBARDOUR_API ControlProtocolInfo { public: ControlProtocolDescriptor* descriptor; ControlProtocol* protocol; @@ -52,7 +52,7 @@ public: ~ControlProtocolInfo() { delete state; } }; -class ControlProtocolManager : public PBD::Stateful, public ARDOUR::SessionHandlePtr +class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR::SessionHandlePtr { public: ~ControlProtocolManager (); diff --git a/libs/ardour/ardour/coreaudiosource.h b/libs/ardour/ardour/coreaudiosource.h index 820fa0b9d8..84ad434809 100644 --- a/libs/ardour/ardour/coreaudiosource.h +++ b/libs/ardour/ardour/coreaudiosource.h @@ -28,7 +28,7 @@ using namespace std; namespace ARDOUR { -class CoreAudioSource : public AudioFileSource { +class LIBARDOUR_API CoreAudioSource : public AudioFileSource { public: CoreAudioSource (ARDOUR::Session&, const XMLNode&); CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag); diff --git a/libs/ardour/ardour/cycle_timer.h b/libs/ardour/ardour/cycle_timer.h index 35cc2a4c73..0335375c8a 100644 --- a/libs/ardour/ardour/cycle_timer.h +++ b/libs/ardour/ardour/cycle_timer.h @@ -24,12 +24,13 @@ #include #include +#include "ardour/libardour_visibility.h" #include "ardour/cycles.h" #include "ardour/debug.h" float get_mhz (); -class CycleTimer { +class LIBARDOUR_API CycleTimer { private: static float cycles_per_usec; #ifndef NDEBUG @@ -61,7 +62,7 @@ class CycleTimer { } }; -class StoringTimer +class LIBARDOUR_API StoringTimer { public: StoringTimer (int); diff --git a/libs/ardour/ardour/data_type.h b/libs/ardour/ardour/data_type.h index b4129e2629..2a4514a5cf 100644 --- a/libs/ardour/ardour/data_type.h +++ b/libs/ardour/ardour/data_type.h @@ -24,6 +24,8 @@ #include #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** A type of Data Ardour is capable of processing. @@ -32,7 +34,7 @@ namespace ARDOUR { * other type representations, simple comparison between then, etc. This code * is deliberately 'ugly' so other code doesn't have to be. */ -class DataType +class LIBARDOUR_API DataType { public: /** Numeric symbol for this DataType. diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index 4a6d4368a6..e19eef719f 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -21,6 +21,7 @@ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/chan_count.h" #include "ardour/io_processor.h" @@ -34,7 +35,7 @@ class PannerShell; class Panner; class Pannable; -class Delivery : public IOProcessor +class LIBARDOUR_API Delivery : public IOProcessor { public: enum Role { diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index 7a4bccbb46..5bd18663b8 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -34,6 +34,7 @@ #include "ardour/ardour.h" #include "ardour/chan_count.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/public_diskstream.h" @@ -54,7 +55,7 @@ class BufferSet; /** Parent class for classes which can stream data to and from disk. * These are used by Tracks to get playback and put recorded data. */ -class Diskstream : public SessionObject, public PublicDiskstream +class LIBARDOUR_API Diskstream : public SessionObject, public PublicDiskstream { public: enum Flag { diff --git a/libs/ardour/ardour/element_import_handler.h b/libs/ardour/ardour/element_import_handler.h index be2e3fafb0..167bc1c7b1 100644 --- a/libs/ardour/ardour/element_import_handler.h +++ b/libs/ardour/ardour/element_import_handler.h @@ -27,7 +27,10 @@ #include -class XMLTree; +#include "ardour/libardour_visibility.h" +#include "pbd/libpbd_visibility.h" + +class LIBPBD_API XMLTree; namespace ARDOUR { @@ -35,7 +38,7 @@ class Session; class ElementImporter; /// Virtual interface class for element import handlers -class ElementImportHandler +class LIBARDOUR_API ElementImportHandler { public: typedef boost::shared_ptr ElementPtr; diff --git a/libs/ardour/ardour/element_importer.h b/libs/ardour/ardour/element_importer.h index 8c25fd380d..b6d6ff7166 100644 --- a/libs/ardour/ardour/element_importer.h +++ b/libs/ardour/ardour/element_importer.h @@ -25,6 +25,7 @@ #include #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLTree; @@ -34,7 +35,7 @@ class Session; class ImportStatus; /// Virtual interface class for element importers -class ElementImporter +class LIBARDOUR_API ElementImporter { public: diff --git a/libs/ardour/ardour/event_type_map.h b/libs/ardour/ardour/event_type_map.h index 02852e9711..fbfd9ec73c 100644 --- a/libs/ardour/ardour/event_type_map.h +++ b/libs/ardour/ardour/event_type_map.h @@ -25,12 +25,14 @@ #include "evoral/TypeMap.hpp" #include "evoral/ControlList.hpp" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** This is the interface Ardour provides to Evoral about what * parameter and event types/ranges/names etc. to use. */ -class EventTypeMap : public Evoral::TypeMap { +class LIBARDOUR_API EventTypeMap : public Evoral::TypeMap { public: bool type_is_midi(uint32_t type) const; uint8_t parameter_midi_type(const Evoral::Parameter& param) const; diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h index f3244095a3..894406874e 100644 --- a/libs/ardour/ardour/export_channel.h +++ b/libs/ardour/ardour/export_channel.h @@ -40,7 +40,7 @@ class AudioRegion; class CapturingProcessor; /// Export channel base class interface for different source types -class ExportChannel : public boost::less_than_comparable +class LIBARDOUR_API ExportChannel : public boost::less_than_comparable { public: @@ -62,7 +62,7 @@ class ExportChannel : public boost::less_than_comparable }; /// Basic export channel that reads from AudioPorts -class PortExportChannel : public ExportChannel +class LIBARDOUR_API PortExportChannel : public ExportChannel { public: typedef std::set > PortSet; @@ -89,7 +89,7 @@ class PortExportChannel : public ExportChannel /// Handles RegionExportChannels and does actual reading from region -class RegionExportChannelFactory +class LIBARDOUR_API RegionExportChannelFactory { public: enum Type { @@ -128,7 +128,7 @@ class RegionExportChannelFactory }; /// Export channel that reads from region channel -class RegionExportChannel : public ExportChannel +class LIBARDOUR_API RegionExportChannel : public ExportChannel { friend class RegionExportChannelFactory; @@ -152,7 +152,7 @@ class RegionExportChannel : public ExportChannel }; /// Export channel for exporting from different positions in a route -class RouteExportChannel : public ExportChannel +class LIBARDOUR_API RouteExportChannel : public ExportChannel { class ProcessorRemover; // fwd declaration diff --git a/libs/ardour/ardour/export_channel_configuration.h b/libs/ardour/ardour/export_channel_configuration.h index b625be9dc3..4cab886c88 100644 --- a/libs/ardour/ardour/export_channel_configuration.h +++ b/libs/ardour/ardour/export_channel_configuration.h @@ -37,7 +37,7 @@ namespace ARDOUR class Session; -class ExportChannelConfiguration : public boost::enable_shared_from_this +class LIBARDOUR_API ExportChannelConfiguration : public boost::enable_shared_from_this { private: diff --git a/libs/ardour/ardour/export_failed.h b/libs/ardour/ardour/export_failed.h index 16687826b1..f1fd57ab4b 100644 --- a/libs/ardour/ardour/export_failed.h +++ b/libs/ardour/ardour/export_failed.h @@ -24,10 +24,12 @@ #include #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class ExportFailed : public std::exception +class LIBARDOUR_API ExportFailed : public std::exception { public: ExportFailed (std::string const &); diff --git a/libs/ardour/ardour/export_filename.h b/libs/ardour/ardour/export_filename.h index 994f584e8d..7eacc11b90 100644 --- a/libs/ardour/ardour/export_filename.h +++ b/libs/ardour/ardour/export_filename.h @@ -34,7 +34,7 @@ namespace ARDOUR class Session; -class ExportFilename { +class LIBARDOUR_API ExportFilename { public: enum DateFormat { diff --git a/libs/ardour/ardour/export_format_base.h b/libs/ardour/ardour/export_format_base.h index a21c977833..7ffb433e1a 100644 --- a/libs/ardour/ardour/export_format_base.h +++ b/libs/ardour/ardour/export_format_base.h @@ -30,6 +30,7 @@ #include #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "audiographer/general/sample_format_converter.h" @@ -37,7 +38,7 @@ namespace ARDOUR { -class ExportFormatBase { +class LIBARDOUR_API ExportFormatBase { public: enum Type { diff --git a/libs/ardour/ardour/export_format_compatibility.h b/libs/ardour/ardour/export_format_compatibility.h index a220e4e4a2..6f6e367ae0 100644 --- a/libs/ardour/ardour/export_format_compatibility.h +++ b/libs/ardour/ardour/export_format_compatibility.h @@ -28,7 +28,7 @@ namespace ARDOUR { /// Allows adding to all sets. A format should be able to test if it is compatible with this -class ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { +class LIBARDOUR_API ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { private: public: diff --git a/libs/ardour/ardour/export_format_manager.h b/libs/ardour/ardour/export_format_manager.h index 2b5d0ad804..9a95111509 100644 --- a/libs/ardour/ardour/export_format_manager.h +++ b/libs/ardour/ardour/export_format_manager.h @@ -39,7 +39,7 @@ class ExportFormatCompatibility; class ExportFormatSpecification; class AnyTime; -class ExportFormatManager : public PBD::ScopedConnectionList +class LIBARDOUR_API ExportFormatManager : public PBD::ScopedConnectionList { public: diff --git a/libs/ardour/ardour/export_format_specification.h b/libs/ardour/ardour/export_format_specification.h index fc03eb94b0..1593990d35 100644 --- a/libs/ardour/ardour/export_format_specification.h +++ b/libs/ardour/ardour/export_format_specification.h @@ -25,6 +25,7 @@ #include "pbd/uuid.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/export_format_base.h" @@ -37,7 +38,7 @@ class ExportFormat; class ExportFormatCompatibility; class Session; -class ExportFormatSpecification : public ExportFormatBase { +class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase { private: diff --git a/libs/ardour/ardour/export_formats.h b/libs/ardour/ardour/export_formats.h index 0e9a93ff96..076bb90d3d 100644 --- a/libs/ardour/ardour/export_formats.h +++ b/libs/ardour/ardour/export_formats.h @@ -33,13 +33,13 @@ namespace ARDOUR { -class ExportFormatIncompatible : public failed_constructor { +class LIBARDOUR_API ExportFormatIncompatible : public failed_constructor { public: virtual const char *what() const throw() { return "Export format constructor failed: Format incompatible with system"; } }; /// Base class for formats -class ExportFormat : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { +class LIBARDOUR_API ExportFormat : public ExportFormatBase, public ExportFormatBase::SelectableCompatible { public: ExportFormat () {}; @@ -86,7 +86,7 @@ class ExportFormat : public ExportFormatBase, public ExportFormatBase::Selectabl }; /// Class to be inherited by export formats that have a selectable sample format -class HasSampleFormat : public PBD::ScopedConnectionList { +class LIBARDOUR_API HasSampleFormat : public PBD::ScopedConnectionList { public: class SampleFormatState : public ExportFormatBase::SelectableCompatible { @@ -156,7 +156,7 @@ class HasSampleFormat : public PBD::ScopedConnectionList { ExportFormatBase::SampleFormatSet & _sample_formats; }; -class ExportFormatLinear : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatLinear : public ExportFormat, public HasSampleFormat { public: ExportFormatLinear (std::string name, FormatId format_id); @@ -174,7 +174,7 @@ class ExportFormatLinear : public ExportFormat, public HasSampleFormat { SampleFormat _default_sample_format; }; -class ExportFormatOggVorbis : public ExportFormat { +class LIBARDOUR_API ExportFormatOggVorbis : public ExportFormat { public: ExportFormatOggVorbis (); ~ExportFormatOggVorbis () {}; @@ -185,7 +185,7 @@ class ExportFormatOggVorbis : public ExportFormat { virtual bool supports_tagging () const { return true; } }; -class ExportFormatFLAC : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatFLAC : public ExportFormat, public HasSampleFormat { public: ExportFormatFLAC (); ~ExportFormatFLAC () {}; @@ -198,7 +198,7 @@ class ExportFormatFLAC : public ExportFormat, public HasSampleFormat { virtual bool supports_tagging () const { return true; } }; -class ExportFormatBWF : public ExportFormat, public HasSampleFormat { +class LIBARDOUR_API ExportFormatBWF : public ExportFormat, public HasSampleFormat { public: ExportFormatBWF (); ~ExportFormatBWF () {}; diff --git a/libs/ardour/ardour/export_graph_builder.h b/libs/ardour/ardour/export_graph_builder.h index 07e866475a..40960b2b38 100644 --- a/libs/ardour/ardour/export_graph_builder.h +++ b/libs/ardour/ardour/export_graph_builder.h @@ -48,7 +48,7 @@ namespace ARDOUR class ExportTimespan; class Session; -class ExportGraphBuilder +class LIBARDOUR_API ExportGraphBuilder { private: typedef ExportHandler::FileSpec FileSpec; diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h index d4dd5627f7..1bc80a80e9 100644 --- a/libs/ardour/ardour/export_handler.h +++ b/libs/ardour/ardour/export_handler.h @@ -29,6 +29,7 @@ #include "ardour/export_pointers.h" #include "ardour/session.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace AudioGrapher { @@ -45,7 +46,7 @@ class ExportFilename; class ExportGraphBuilder; class Location; -class ExportElementFactory +class LIBARDOUR_API ExportElementFactory { public: @@ -67,7 +68,7 @@ class ExportElementFactory Session & session; }; -class ExportHandler : public ExportElementFactory +class LIBARDOUR_API ExportHandler : public ExportElementFactory { public: struct FileSpec { diff --git a/libs/ardour/ardour/export_pointers.h b/libs/ardour/ardour/export_pointers.h index edd7f91325..ee29f0ee4c 100644 --- a/libs/ardour/ardour/export_pointers.h +++ b/libs/ardour/ardour/export_pointers.h @@ -25,6 +25,7 @@ #include #include +#include "ardour/libardour_visibility.h" #include "ardour/comparable_shared_ptr.h" namespace AudioGrapher { diff --git a/libs/ardour/ardour/export_preset.h b/libs/ardour/ardour/export_preset.h index b24cc70dcf..b11ab75bab 100644 --- a/libs/ardour/ardour/export_preset.h +++ b/libs/ardour/ardour/export_preset.h @@ -26,12 +26,14 @@ #include "pbd/uuid.h" #include "pbd/xml++.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class Session; -class ExportPreset { +class LIBARDOUR_API ExportPreset { public: ExportPreset (std::string filename, Session & s); ~ExportPreset (); diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h index 424e0fe163..935df25528 100644 --- a/libs/ardour/ardour/export_profile_manager.h +++ b/libs/ardour/ardour/export_profile_manager.h @@ -35,6 +35,7 @@ #include "ardour/filesystem_paths.h" #include "ardour/location.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/export_handler.h" @@ -46,7 +47,7 @@ class Location; class Session; /// Manages (de)serialization of export profiles and related classes -class ExportProfileManager +class LIBARDOUR_API ExportProfileManager { public: diff --git a/libs/ardour/ardour/export_status.h b/libs/ardour/ardour/export_status.h index 31027269f8..6a5be177e4 100644 --- a/libs/ardour/ardour/export_status.h +++ b/libs/ardour/ardour/export_status.h @@ -23,6 +23,7 @@ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "pbd/signals.h" @@ -30,7 +31,7 @@ namespace ARDOUR { -class ExportStatus { +class LIBARDOUR_API ExportStatus { public: ExportStatus (); void init (); diff --git a/libs/ardour/ardour/export_timespan.h b/libs/ardour/ardour/export_timespan.h index 5cb32dbb1a..754335ba48 100644 --- a/libs/ardour/ardour/export_timespan.h +++ b/libs/ardour/ardour/export_timespan.h @@ -25,6 +25,7 @@ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR @@ -34,7 +35,7 @@ class ExportStatus; class ExportChannel; class ExportTempFile; -class ExportTimespan +class LIBARDOUR_API ExportTimespan { private: typedef boost::shared_ptr ExportStatusPtr; diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h index 5898d04f0a..568bc3204b 100644 --- a/libs/ardour/ardour/file_source.h +++ b/libs/ardour/ardour/file_source.h @@ -28,7 +28,7 @@ namespace ARDOUR { -class MissingSource : public std::exception +class LIBARDOUR_API MissingSource : public std::exception { public: MissingSource (const std::string& p, DataType t) throw () @@ -42,7 +42,7 @@ class MissingSource : public std::exception }; /** A source associated with a file on disk somewhere */ -class FileSource : virtual public Source { +class LIBARDOUR_API FileSource : virtual public Source { public: virtual ~FileSource () {} diff --git a/libs/ardour/ardour/filter.h b/libs/ardour/ardour/filter.h index a9cdc893a6..2b6476c49f 100644 --- a/libs/ardour/ardour/filter.h +++ b/libs/ardour/ardour/filter.h @@ -23,6 +23,7 @@ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -31,7 +32,7 @@ class Region; class Session; class Progress; -class Filter { +class LIBARDOUR_API Filter { public: virtual ~Filter() {} diff --git a/libs/ardour/ardour/graph.h b/libs/ardour/ardour/graph.h index 763723c792..b433580a54 100644 --- a/libs/ardour/ardour/graph.h +++ b/libs/ardour/ardour/graph.h @@ -33,6 +33,7 @@ #include "pbd/semutils.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/audio_backend.h" #include "ardour/session_handle.h" @@ -52,7 +53,7 @@ typedef boost::shared_ptr node_ptr_t; typedef std::list< node_ptr_t > node_list_t; typedef std::set< node_ptr_t > node_set_t; -class Graph : public SessionHandleRef +class LIBARDOUR_API Graph : public SessionHandleRef { public: Graph (Session & session); diff --git a/libs/ardour/ardour/graphnode.h b/libs/ardour/ardour/graphnode.h index 9e0182300f..55867eac4c 100644 --- a/libs/ardour/ardour/graphnode.h +++ b/libs/ardour/ardour/graphnode.h @@ -38,7 +38,7 @@ typedef std::set< node_ptr_t > node_set_t; typedef std::list< node_ptr_t > node_list_t; /** A node on our processing graph, ie a Route */ -class GraphNode +class LIBARDOUR_API GraphNode { public: GraphNode( boost::shared_ptr Graph ); diff --git a/libs/ardour/ardour/iec1ppmdsp.h b/libs/ardour/ardour/iec1ppmdsp.h index 58dea97555..3e0637716d 100644 --- a/libs/ardour/ardour/iec1ppmdsp.h +++ b/libs/ardour/ardour/iec1ppmdsp.h @@ -20,8 +20,9 @@ #ifndef __IEC1PPMDSP_H #define __IEC1PPMDSP_H +#include "ardour/libardour_visibility.h" -class Iec1ppmdsp +class LIBARDOUR_API Iec1ppmdsp { public: diff --git a/libs/ardour/ardour/iec2ppmdsp.h b/libs/ardour/ardour/iec2ppmdsp.h index 3574a8bd3f..aa5a90cdb9 100644 --- a/libs/ardour/ardour/iec2ppmdsp.h +++ b/libs/ardour/ardour/iec2ppmdsp.h @@ -20,8 +20,9 @@ #ifndef __IEC2PPMDSP_H #define __IEC2PPMDSP_H +#include "ardour/libardour_visibility.h" -class Iec2ppmdsp +class LIBARDOUR_API Iec2ppmdsp { public: diff --git a/libs/ardour/ardour/import_status.h b/libs/ardour/ardour/import_status.h index c261b7a960..4dbf8f8456 100644 --- a/libs/ardour/ardour/import_status.h +++ b/libs/ardour/ardour/import_status.h @@ -26,11 +26,12 @@ #include #include "ardour/interthread_info.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class ImportStatus : public InterThreadInfo { +class LIBARDOUR_API ImportStatus : public InterThreadInfo { public: std::string doing_what; diff --git a/libs/ardour/ardour/importable_source.h b/libs/ardour/ardour/importable_source.h index fc695d88c1..9463f0b28b 100644 --- a/libs/ardour/ardour/importable_source.h +++ b/libs/ardour/ardour/importable_source.h @@ -21,11 +21,12 @@ #define __ardour_importable_source_h__ #include "pbd/failed_constructor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class ImportableSource { +class LIBARDOUR_API ImportableSource { public: ImportableSource () {} virtual ~ImportableSource() {} diff --git a/libs/ardour/ardour/instrument_info.h b/libs/ardour/ardour/instrument_info.h index 8691db24e5..5cbcbd53bc 100644 --- a/libs/ardour/ardour/instrument_info.h +++ b/libs/ardour/ardour/instrument_info.h @@ -28,19 +28,22 @@ #include "evoral/Parameter.hpp" +#include "midi++/libmidi_visibility.h" +#include "ardour/libardour_visibility.h" + namespace MIDI { -namespace Name { -class ChannelNameSet; -class Patch; -typedef std::list > PatchNameList; -} + namespace Name { + class LIBMIDIPP_API ChannelNameSet; + class LIBMIDIPP_API Patch; + typedef std::list > PatchNameList; + } } namespace ARDOUR { class Processor; -class InstrumentInfo { +class LIBARDOUR_API InstrumentInfo { public: InstrumentInfo(); ~InstrumentInfo (); diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h index 4d2b32f031..d12b330e37 100644 --- a/libs/ardour/ardour/internal_return.h +++ b/libs/ardour/ardour/internal_return.h @@ -29,7 +29,7 @@ namespace ARDOUR { class InternalSend; -class InternalReturn : public Return +class LIBARDOUR_API InternalReturn : public Return { public: InternalReturn (Session&); diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index a7f0f73e6e..8636a805db 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class InternalSend : public Send +class LIBARDOUR_API InternalSend : public Send { public: InternalSend (Session&, boost::shared_ptr, boost::shared_ptr, boost::shared_ptr send_to, Delivery::Role role); diff --git a/libs/ardour/ardour/interpolation.h b/libs/ardour/ardour/interpolation.h index a4a332c8a2..64b0431e0f 100644 --- a/libs/ardour/ardour/interpolation.h +++ b/libs/ardour/ardour/interpolation.h @@ -20,6 +20,7 @@ #include #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #ifndef __interpolation_h__ @@ -27,7 +28,7 @@ namespace ARDOUR { -class Interpolation { +class LIBARDOUR_API Interpolation { protected: double _speed; double _target_speed; @@ -57,12 +58,12 @@ public: } }; -class LinearInterpolation : public Interpolation { +class LIBARDOUR_API LinearInterpolation : public Interpolation { public: framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output); }; -class CubicInterpolation : public Interpolation { +class LIBARDOUR_API CubicInterpolation : public Interpolation { public: framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output); }; diff --git a/libs/ardour/ardour/interthread_info.h b/libs/ardour/ardour/interthread_info.h index 01cacf437c..2cc786c6e2 100644 --- a/libs/ardour/ardour/interthread_info.h +++ b/libs/ardour/ardour/interthread_info.h @@ -22,6 +22,7 @@ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/process_thread.h" diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index adad0c753f..1688a2a36d 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -40,6 +40,7 @@ #include "ardour/latent.h" #include "ardour/port_set.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/buffer_set.h" @@ -64,7 +65,7 @@ class UserBundle; * An IO can contain ports of varying types, making routes/inserts/etc with * varied combinations of types (eg MIDI and audio) possible. */ -class IO : public SessionObject, public Latent +class LIBARDOUR_API IO : public SessionObject, public Latent { public: static const std::string state_node_name; diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index 7adfab2225..a2735453a7 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -40,7 +40,7 @@ class Route; /** A mixer strip element (Processor) with 1 or 2 IO elements. */ -class IOProcessor : public Processor +class LIBARDOUR_API IOProcessor : public Processor { public: IOProcessor (Session&, bool with_input, bool with_output, diff --git a/libs/ardour/ardour/kmeterdsp.h b/libs/ardour/ardour/kmeterdsp.h index eca3c76695..374afff50e 100644 --- a/libs/ardour/ardour/kmeterdsp.h +++ b/libs/ardour/ardour/kmeterdsp.h @@ -20,7 +20,9 @@ #ifndef __KMETERDSP_H #define __KMETERDSP_H -class Kmeterdsp +#include "ardour/libardour_visibility.h" + +class LIBARDOUR_API Kmeterdsp { public: diff --git a/libs/ardour/ardour/ladspa_plugin.h b/libs/ardour/ardour/ladspa_plugin.h index 6853a1dc36..4444686dcb 100644 --- a/libs/ardour/ardour/ladspa_plugin.h +++ b/libs/ardour/ardour/ladspa_plugin.h @@ -36,7 +36,7 @@ namespace ARDOUR { class AudioEngine; class Session; -class LadspaPlugin : public ARDOUR::Plugin +class LIBARDOUR_API LadspaPlugin : public ARDOUR::Plugin { public: LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, framecnt_t sample_rate); @@ -146,7 +146,7 @@ class LadspaPlugin : public ARDOUR::Plugin void add_state (XMLNode *) const; }; -class LadspaPluginInfo : public PluginInfo { +class LIBARDOUR_API LadspaPluginInfo : public PluginInfo { public: LadspaPluginInfo (); ~LadspaPluginInfo () { }; diff --git a/libs/ardour/ardour/latent.h b/libs/ardour/ardour/latent.h index c6e81c17a2..bd639a8651 100644 --- a/libs/ardour/ardour/latent.h +++ b/libs/ardour/ardour/latent.h @@ -20,11 +20,12 @@ #ifndef __ardour_latent_h__ #define __ardour_latent_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class Latent { +class LIBARDOUR_API Latent { public: Latent() : _user_latency (0) {} virtual ~Latent() {} diff --git a/libs/ardour/ardour/libardour_visibility.h b/libs/ardour/ardour/libardour_visibility.h index ae07961ef3..ed5cacf261 100644 --- a/libs/ardour/ardour/libardour_visibility.h +++ b/libs/ardour/ardour/libardour_visibility.h @@ -38,8 +38,6 @@ #define LIBARDOUR_DLL_IMPORT #define LIBARDOUR_DLL_EXPORT #define LIBARDOUR_DLL_LOCAL - #define LIBARDOUR_DLL_IMPORT_CLASS - #define LIBARDOUR_DLL_EXPORT_CLASS #endif #endif diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index bb42df1b58..b0956eea36 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -38,7 +38,7 @@ namespace ARDOUR { -class Location : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API Location : public SessionHandleRef, public PBD::StatefulDestructible { public: enum Flags { @@ -131,7 +131,7 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible void recompute_bbt_from_frames (); }; -class Locations : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API Locations : public SessionHandleRef, public PBD::StatefulDestructible { public: typedef std::list LocationList; diff --git a/libs/ardour/ardour/location_importer.h b/libs/ardour/ardour/location_importer.h index 332c5ae685..574b948062 100644 --- a/libs/ardour/ardour/location_importer.h +++ b/libs/ardour/ardour/location_importer.h @@ -33,14 +33,14 @@ namespace ARDOUR { class Location; class Session; -class LocationImportHandler : public ElementImportHandler +class LIBARDOUR_API LocationImportHandler : public ElementImportHandler { public: LocationImportHandler (XMLTree const & source, Session & session); std::string get_info () const; }; -class LocationImporter : public ElementImporter +class LIBARDOUR_API LocationImporter : public ElementImporter { public: LocationImporter (XMLTree const & source, Session & session, LocationImportHandler & handler, XMLNode const & node); diff --git a/libs/ardour/ardour/logcurve.h b/libs/ardour/ardour/logcurve.h index 4c91ad9a79..2585da66c8 100644 --- a/libs/ardour/ardour/logcurve.h +++ b/libs/ardour/ardour/logcurve.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class LogCurve { +class LIBARDOUR_API LogCurve { public: LogCurve (float steepness = 0.2, uint32_t len = 0) { l = len; @@ -102,7 +102,7 @@ class LogCurve { uint32_t l; }; -class LogCurveIn : public LogCurve +class LIBARDOUR_API LogCurveIn : public LogCurve { public: LogCurveIn (float steepness = 0.2, uint32_t len = 0) @@ -117,7 +117,7 @@ class LogCurveIn : public LogCurve } }; -class LogCurveOut : public LogCurve +class LIBARDOUR_API LogCurveOut : public LogCurve { public: LogCurveOut (float steepness = 0.2, uint32_t len = 0) diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index 56aa9dc7cf..a9cb2cb260 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -41,7 +41,7 @@ const void* lv2plugin_get_port_value(const char* port_symbol, class AudioEngine; class Session; -class LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee +class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee { public: LV2Plugin (ARDOUR::AudioEngine& engine, @@ -270,7 +270,7 @@ class LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee }; -class LV2PluginInfo : public PluginInfo { +class LIBARDOUR_API LV2PluginInfo : public PluginInfo { public: LV2PluginInfo (const void* c_plugin); ~LV2PluginInfo (); diff --git a/libs/ardour/ardour/lxvst_plugin.h b/libs/ardour/ardour/lxvst_plugin.h index 58bc626d32..1eba007790 100644 --- a/libs/ardour/ardour/lxvst_plugin.h +++ b/libs/ardour/ardour/lxvst_plugin.h @@ -22,7 +22,7 @@ #include "ardour/vst_plugin.h" -struct _VSTHandle; +struct LIBARDOUR_API _VSTHandle; typedef struct _VSTHandle VSTHandle; namespace ARDOUR { @@ -30,7 +30,7 @@ namespace ARDOUR { class AudioEngine; class Session; -class LXVSTPlugin : public VSTPlugin +class LIBARDOUR_API LXVSTPlugin : public VSTPlugin { public: LXVSTPlugin (AudioEngine &, Session &, VSTHandle *); @@ -40,7 +40,7 @@ class LXVSTPlugin : public VSTPlugin std::string state_node_name () const { return "lxvst"; } }; -class LXVSTPluginInfo : public PluginInfo +class LIBARDOUR_API LXVSTPluginInfo : public PluginInfo { public: LXVSTPluginInfo (); diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h index df1e381bb4..8ed1ade50d 100644 --- a/libs/ardour/ardour/meter.h +++ b/libs/ardour/ardour/meter.h @@ -20,6 +20,7 @@ #define __ardour_meter_h__ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" #include "pbd/fastlog.h" @@ -35,7 +36,7 @@ class BufferSet; class ChanCount; class Session; -class Metering { +class LIBARDOUR_API Metering { public: static void update_meters (); static PBD::Signal0 Meter; @@ -47,7 +48,7 @@ class Metering { /** Meters peaks on the input and stores them for access. */ -class PeakMeter : public Processor { +class LIBARDOUR_API PeakMeter : public Processor { public: PeakMeter(Session& s, const std::string& name); ~PeakMeter(); diff --git a/libs/ardour/ardour/midi_automation_list_binder.h b/libs/ardour/ardour/midi_automation_list_binder.h index 89c6cdb90b..241c4e7320 100644 --- a/libs/ardour/ardour/midi_automation_list_binder.h +++ b/libs/ardour/ardour/midi_automation_list_binder.h @@ -27,7 +27,7 @@ class MidiSource; class AutomationList; /** A class for late-binding a MidiSource and a Parameter to an AutomationList */ -class MidiAutomationListBinder : public MementoCommandBinder +class LIBARDOUR_API MidiAutomationListBinder : public MementoCommandBinder { public: MidiAutomationListBinder (boost::shared_ptr, Evoral::Parameter); diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h index 781396a598..0a799c41ab 100644 --- a/libs/ardour/ardour/midi_buffer.h +++ b/libs/ardour/ardour/midi_buffer.h @@ -29,7 +29,7 @@ namespace ARDOUR { /** Buffer containing 8-bit unsigned char (MIDI) data. */ -class MidiBuffer : public Buffer +class LIBARDOUR_API MidiBuffer : public Buffer { public: typedef framepos_t TimeType; diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index b1c126b339..1ee54e5995 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -40,7 +40,7 @@ #include "ardour/midi_ring_buffer.h" #include "ardour/utils.h" -struct tm; +struct LIBARDOUR_API tm; namespace ARDOUR { @@ -52,7 +52,7 @@ class SMFSource; class Send; class Session; -class MidiDiskstream : public Diskstream +class LIBARDOUR_API MidiDiskstream : public Diskstream { public: MidiDiskstream (Session &, const string& name, Diskstream::Flag f = Recordable); diff --git a/libs/ardour/ardour/midi_model.h b/libs/ardour/ardour/midi_model.h index 3ecfca7d1c..98743969f7 100644 --- a/libs/ardour/ardour/midi_model.h +++ b/libs/ardour/ardour/midi_model.h @@ -27,10 +27,12 @@ #include #include #include "pbd/command.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_buffer.h" #include "ardour/midi_ring_buffer.h" #include "ardour/automatable_sequence.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "evoral/Note.hpp" #include "evoral/Sequence.hpp" @@ -47,7 +49,7 @@ class MidiSource; * Because of this MIDI controllers and automatable controllers/widgets/etc * are easily interchangeable. */ -class MidiModel : public AutomatableSequence { +class LIBARDOUR_API MidiModel : public AutomatableSequence { public: typedef Evoral::MusicalTime TimeType; diff --git a/libs/ardour/ardour/midi_operator.h b/libs/ardour/ardour/midi_operator.h index c5def76384..00678a2831 100644 --- a/libs/ardour/ardour/midi_operator.h +++ b/libs/ardour/ardour/midi_operator.h @@ -32,7 +32,7 @@ namespace ARDOUR { class MidiModel; -class MidiOperator { +class LIBARDOUR_API MidiOperator { public: MidiOperator () {} virtual ~MidiOperator() {} diff --git a/libs/ardour/ardour/midi_patch_manager.h b/libs/ardour/ardour/midi_patch_manager.h index 32b3ebc61d..e9751c6956 100644 --- a/libs/ardour/ardour/midi_patch_manager.h +++ b/libs/ardour/ardour/midi_patch_manager.h @@ -35,7 +35,7 @@ namespace MIDI namespace Name { -class MidiPatchManager : public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr +class LIBARDOUR_API MidiPatchManager : public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr { /// Singleton private: diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h index 543e1b353f..e53b4a4ee0 100644 --- a/libs/ardour/ardour/midi_playlist.h +++ b/libs/ardour/ardour/midi_playlist.h @@ -37,7 +37,7 @@ class MidiRegion; class Source; template class MidiRingBuffer; -class MidiPlaylist : public ARDOUR::Playlist +class LIBARDOUR_API MidiPlaylist : public ARDOUR::Playlist { public: MidiPlaylist (Session&, const XMLNode&, bool hidden = false); diff --git a/libs/ardour/ardour/midi_playlist_source.h b/libs/ardour/ardour/midi_playlist_source.h index 5e3bb0de67..7a61f5aa02 100644 --- a/libs/ardour/ardour/midi_playlist_source.h +++ b/libs/ardour/ardour/midi_playlist_source.h @@ -32,7 +32,7 @@ namespace ARDOUR { class MidiPlaylist; -class MidiPlaylistSource : public MidiSource, public PlaylistSource { +class LIBARDOUR_API MidiPlaylistSource : public MidiSource, public PlaylistSource { public: virtual ~MidiPlaylistSource (); diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h index 00617d90ec..cc9fee1b15 100644 --- a/libs/ardour/ardour/midi_port.h +++ b/libs/ardour/ardour/midi_port.h @@ -31,7 +31,7 @@ namespace ARDOUR { class MidiEngine; -class MidiPort : public Port { +class LIBARDOUR_API MidiPort : public Port { public: ~MidiPort(); diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h index daca7a243d..5196438926 100644 --- a/libs/ardour/ardour/midi_region.h +++ b/libs/ardour/ardour/midi_region.h @@ -53,9 +53,10 @@ class MidiFilter; class MidiModel; class MidiSource; class MidiStateTracker; + template class MidiRingBuffer; -class MidiRegion : public Region +class LIBARDOUR_API MidiRegion : public Region { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/midi_ring_buffer.h b/libs/ardour/ardour/midi_ring_buffer.h index d5c9947b9a..2d35be679f 100644 --- a/libs/ardour/ardour/midi_ring_buffer.h +++ b/libs/ardour/ardour/midi_ring_buffer.h @@ -24,6 +24,7 @@ #include "evoral/EventRingBuffer.hpp" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_state_tracker.h" @@ -40,7 +41,7 @@ class MidiBuffer; * [timestamp][type][size][size bytes of raw MIDI][timestamp][type][size](etc...) */ template -class MidiRingBuffer : public Evoral::EventRingBuffer { +class LIBARDOUR_API MidiRingBuffer : public Evoral::EventRingBuffer { public: /** @param size Size in bytes. */ diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h index a5aac8859b..ba50102ec9 100644 --- a/libs/ardour/ardour/midi_source.h +++ b/libs/ardour/ardour/midi_source.h @@ -36,10 +36,11 @@ namespace ARDOUR { class MidiStateTracker; class MidiModel; + template class MidiRingBuffer; /** Source for MIDI data */ -class MidiSource : virtual public Source, public boost::enable_shared_from_this +class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_shared_from_this { public: typedef double TimeType; diff --git a/libs/ardour/ardour/midi_state_tracker.h b/libs/ardour/ardour/midi_state_tracker.h index 24d3ab73a1..046e77f38c 100644 --- a/libs/ardour/ardour/midi_state_tracker.h +++ b/libs/ardour/ardour/midi_state_tracker.h @@ -27,12 +27,13 @@ template class EventSink; } namespace ARDOUR { + class MidiSource; /** Tracks played notes, so they can be resolved in potential stuck note * situations (e.g. looping, transport stop, etc). */ -class MidiStateTracker +class LIBARDOUR_API MidiStateTracker { public: MidiStateTracker(); diff --git a/libs/ardour/ardour/midi_stretch.h b/libs/ardour/ardour/midi_stretch.h index 42b201b55a..b6f6ac5073 100644 --- a/libs/ardour/ardour/midi_stretch.h +++ b/libs/ardour/ardour/midi_stretch.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class MidiStretch : public Filter { +class LIBARDOUR_API MidiStretch : public Filter { public: MidiStretch (ARDOUR::Session&, const TimeFXRequest&); ~MidiStretch (); diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index 3b75c0a51b..7e53c5a292 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -33,7 +33,7 @@ class RouteGroup; class SMFSource; class Session; -class MidiTrack : public Track +class LIBARDOUR_API MidiTrack : public Track { public: MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); diff --git a/libs/ardour/ardour/midi_ui.h b/libs/ardour/ardour/midi_ui.h index c15a530057..469f293770 100644 --- a/libs/ardour/ardour/midi_ui.h +++ b/libs/ardour/ardour/midi_ui.h @@ -37,13 +37,13 @@ class AsyncMIDIPort; certain types of requests to the MIDI UI */ -struct MidiUIRequest : public BaseUI::BaseRequestObject { +struct LIBARDOUR_API MidiUIRequest : public BaseUI::BaseRequestObject { public: MidiUIRequest () { } ~MidiUIRequest() { } }; -class MidiControlUI : public AbstractUI +class LIBARDOUR_API MidiControlUI : public AbstractUI { public: MidiControlUI (Session& s); diff --git a/libs/ardour/ardour/midiport_manager.h b/libs/ardour/ardour/midiport_manager.h index 9f93c43d5a..b5b46e8510 100644 --- a/libs/ardour/ardour/midiport_manager.h +++ b/libs/ardour/ardour/midiport_manager.h @@ -29,6 +29,7 @@ #include "midi++/types.h" #include "midi++/port.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -36,7 +37,7 @@ namespace ARDOUR { class MidiPort; class Port; -class MidiPortManager { +class LIBARDOUR_API MidiPortManager { public: MidiPortManager(); virtual ~MidiPortManager (); diff --git a/libs/ardour/ardour/mix.h b/libs/ardour/ardour/mix.h index 1c3fb6e5c4..ebee0561fb 100644 --- a/libs/ardour/ardour/mix.h +++ b/libs/ardour/ardour/mix.h @@ -19,6 +19,7 @@ #ifndef __ardour_mix_h__ #define __ardour_mix_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" diff --git a/libs/ardour/ardour/monitor_processor.h b/libs/ardour/ardour/monitor_processor.h index 64d3b86bfb..41e911f57c 100644 --- a/libs/ardour/ardour/monitor_processor.h +++ b/libs/ardour/ardour/monitor_processor.h @@ -28,6 +28,7 @@ #include "pbd/compose.h" #include "pbd/controllable.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" @@ -38,7 +39,7 @@ namespace ARDOUR { class Session; template -class MPControl : public PBD::Controllable { +class LIBARDOUR_API MPControl : public PBD::Controllable { public: MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag, float lower = 0.0f, float upper = 1.0f) @@ -104,7 +105,7 @@ protected: T _upper; }; -class MonitorProcessor : public Processor +class LIBARDOUR_API MonitorProcessor : public Processor { public: MonitorProcessor (Session&); diff --git a/libs/ardour/ardour/movable.h b/libs/ardour/ardour/movable.h index d68d7620ba..df63987f4f 100644 --- a/libs/ardour/ardour/movable.h +++ b/libs/ardour/ardour/movable.h @@ -22,7 +22,7 @@ namespace ARDOUR { -class Movable { +class LIBARDOUR_API Movable { public: Movable() {} diff --git a/libs/ardour/ardour/mtdm.h b/libs/ardour/ardour/mtdm.h index b46e53c0a2..b57df7254a 100644 --- a/libs/ardour/ardour/mtdm.h +++ b/libs/ardour/ardour/mtdm.h @@ -21,7 +21,9 @@ #include -class MTDM +#include "ardour/libardour_visibility.h" + +class LIBARDOUR_API MTDM { public: diff --git a/libs/ardour/ardour/mute_master.h b/libs/ardour/ardour/mute_master.h index 460c7bf48b..8a83352a5b 100644 --- a/libs/ardour/ardour/mute_master.h +++ b/libs/ardour/ardour/mute_master.h @@ -31,7 +31,7 @@ namespace ARDOUR { class Session; -class MuteMaster : public SessionHandleRef, public PBD::Stateful +class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful { public: /** deliveries to mute when the channel is "muted" */ diff --git a/libs/ardour/ardour/onset_detector.h b/libs/ardour/ardour/onset_detector.h index 6604a3a362..40eac9b465 100644 --- a/libs/ardour/ardour/onset_detector.h +++ b/libs/ardour/ardour/onset_detector.h @@ -27,7 +27,7 @@ namespace ARDOUR { class AudioSource; class Session; -class OnsetDetector : public AudioAnalyser +class LIBARDOUR_API OnsetDetector : public AudioAnalyser { public: OnsetDetector (float sample_rate); diff --git a/libs/ardour/ardour/pan_controllable.h b/libs/ardour/ardour/pan_controllable.h index be0c9260c0..9abbec42ab 100644 --- a/libs/ardour/ardour/pan_controllable.h +++ b/libs/ardour/ardour/pan_controllable.h @@ -34,7 +34,7 @@ namespace ARDOUR { class Session; class Pannable; -class PanControllable : public AutomationControl +class LIBARDOUR_API PanControllable : public AutomationControl { public: PanControllable (Session& s, std::string name, Pannable* o, Evoral::Parameter param) diff --git a/libs/ardour/ardour/pannable.h b/libs/ardour/ardour/pannable.h index 0d5200b685..62c9cd123b 100644 --- a/libs/ardour/ardour/pannable.h +++ b/libs/ardour/ardour/pannable.h @@ -36,7 +36,7 @@ class Session; class AutomationControl; class Panner; -class Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef +class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef { public: Pannable (Session& s); diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index b30b1859a3..cee59923ef 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -30,6 +30,7 @@ #include "pbd/signals.h" #include "pbd/stateful.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/automation_control.h" #include "ardour/automatable.h" @@ -42,7 +43,7 @@ class BufferSet; class AudioBuffer; class Speakers; -class Panner : public PBD::Stateful, public PBD::ScopedConnectionList +class LIBARDOUR_API Panner : public PBD::Stateful, public PBD::ScopedConnectionList { public: Panner (boost::shared_ptr); @@ -172,7 +173,7 @@ protected: } // namespace extern "C" { -struct PanPluginDescriptor { +struct LIBARDOUR_API PanPluginDescriptor { std::string name; int32_t in; int32_t out; diff --git a/libs/ardour/ardour/panner_manager.h b/libs/ardour/ardour/panner_manager.h index 016ba56ce3..e47ed36ec3 100644 --- a/libs/ardour/ardour/panner_manager.h +++ b/libs/ardour/ardour/panner_manager.h @@ -26,7 +26,7 @@ namespace ARDOUR { -struct PannerInfo { +struct LIBARDOUR_API PannerInfo { PanPluginDescriptor descriptor; void* module; @@ -40,7 +40,7 @@ struct PannerInfo { } }; -class PannerManager : public ARDOUR::SessionHandlePtr +class LIBARDOUR_API PannerManager : public ARDOUR::SessionHandlePtr { public: ~PannerManager (); diff --git a/libs/ardour/ardour/panner_shell.h b/libs/ardour/ardour/panner_shell.h index dba5826370..b78573212a 100644 --- a/libs/ardour/ardour/panner_shell.h +++ b/libs/ardour/ardour/panner_shell.h @@ -30,6 +30,7 @@ #include "pbd/cartesian.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_object.h" @@ -45,7 +46,7 @@ class Pannable; /** Class to manage panning by instantiating and controlling * an appropriate Panner object for a given in/out configuration. */ -class PannerShell : public SessionObject +class LIBARDOUR_API PannerShell : public SessionObject { public: PannerShell (std::string name, Session&, boost::shared_ptr); diff --git a/libs/ardour/ardour/peak.h b/libs/ardour/ardour/peak.h index ab99889dd3..9c871a9e35 100644 --- a/libs/ardour/ardour/peak.h +++ b/libs/ardour/ardour/peak.h @@ -21,6 +21,7 @@ #define __ardour_peak_h__ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" diff --git a/libs/ardour/ardour/pi_controller.h b/libs/ardour/ardour/pi_controller.h index bcbc81701a..8daf7a7068 100644 --- a/libs/ardour/ardour/pi_controller.h +++ b/libs/ardour/ardour/pi_controller.h @@ -19,9 +19,10 @@ #ifndef __libardour_pi_controller__ #define __libardour_pi_controller__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" -class PIController { +class LIBARDOUR_API PIController { public: PIController (double resample_factor, int fir_size); ~PIController(); @@ -54,7 +55,7 @@ public: #define ESTIMATOR_SIZE 16 -class PIChaser { +class LIBARDOUR_API PIChaser { public: PIChaser(); ~PIChaser(); diff --git a/libs/ardour/ardour/pitch.h b/libs/ardour/ardour/pitch.h index 961609938c..4c8db5fb80 100644 --- a/libs/ardour/ardour/pitch.h +++ b/libs/ardour/ardour/pitch.h @@ -37,7 +37,7 @@ namespace ARDOUR { namespace ARDOUR { -class Pitch : public RBEffect { +class LIBARDOUR_API Pitch : public RBEffect { public: Pitch (ARDOUR::Session&, TimeFXRequest&); ~Pitch () {} @@ -49,7 +49,7 @@ class Pitch : public RBEffect { namespace ARDOUR { -class Pitch : public Filter { +class LIBARDOUR_API Pitch : public Filter { public: Pitch (ARDOUR::Session&, TimeFXRequest&); ~Pitch () {} diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index 754e48cc25..95c9e739c6 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -58,7 +58,7 @@ namespace Properties { extern PBD::PropertyDescriptor regions; } -class RegionListProperty : public PBD::SequenceProperty > > +class LIBARDOUR_API RegionListProperty : public PBD::SequenceProperty > > { public: RegionListProperty (Playlist&); @@ -78,7 +78,7 @@ class RegionListProperty : public PBD::SequenceProperty +class LIBARDOUR_API Playlist : public SessionObject , public boost::enable_shared_from_this { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/playlist_factory.h b/libs/ardour/ardour/playlist_factory.h index 8b5d9d6a23..505836234b 100644 --- a/libs/ardour/ardour/playlist_factory.h +++ b/libs/ardour/ardour/playlist_factory.h @@ -28,7 +28,7 @@ namespace ARDOUR { class Session; -class PlaylistFactory { +class LIBARDOUR_API PlaylistFactory { public: static PBD::Signal2, bool> PlaylistCreated; diff --git a/libs/ardour/ardour/playlist_source.h b/libs/ardour/ardour/playlist_source.h index 71802fddb6..55cc1f6b59 100644 --- a/libs/ardour/ardour/playlist_source.h +++ b/libs/ardour/ardour/playlist_source.h @@ -31,7 +31,7 @@ namespace ARDOUR { class Playlist; -class PlaylistSource : virtual public Source { +class LIBARDOUR_API PlaylistSource : virtual public Source { public: virtual ~PlaylistSource (); diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 55b76fbb08..7043460d52 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -32,6 +32,7 @@ #include "ardour/cycles.h" #include "ardour/latent.h" #include "ardour/plugin_insert.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_state_tracker.h" @@ -49,7 +50,7 @@ class Plugin; typedef boost::shared_ptr PluginPtr; -class PluginInfo { +class LIBARDOUR_API PluginInfo { public: PluginInfo () { } virtual ~PluginInfo () { } @@ -87,7 +88,7 @@ class PluginInfo { typedef boost::shared_ptr PluginInfoPtr; typedef std::list PluginInfoList; -class Plugin : public PBD::StatefulDestructible, public Latent +class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent { public: Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&); diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index a1b9c5a685..51e1356d12 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -26,6 +26,7 @@ #include #include "ardour/ardour.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/processor.h" #include "ardour/automation_control.h" @@ -40,7 +41,7 @@ class Plugin; /** Plugin inserts: send data through a plugin */ -class PluginInsert : public Processor +class LIBARDOUR_API PluginInsert : public Processor { public: PluginInsert (Session&, boost::shared_ptr = boost::shared_ptr()); diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h index a7a5703690..73de0eb704 100644 --- a/libs/ardour/ardour/plugin_manager.h +++ b/libs/ardour/ardour/plugin_manager.h @@ -30,6 +30,7 @@ #include #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/plugin.h" @@ -37,7 +38,7 @@ namespace ARDOUR { class Plugin; -class PluginManager : public boost::noncopyable { +class LIBARDOUR_API PluginManager : public boost::noncopyable { public: static PluginManager& instance(); diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h index 77bf2b6f71..5fb9a7efc3 100644 --- a/libs/ardour/ardour/port.h +++ b/libs/ardour/ardour/port.h @@ -31,6 +31,7 @@ #include "ardour/data_type.h" #include "ardour/port_engine.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -38,7 +39,7 @@ namespace ARDOUR { class AudioEngine; class Buffer; -class Port : public boost::noncopyable +class LIBARDOUR_API Port : public boost::noncopyable { public: virtual ~Port (); diff --git a/libs/ardour/ardour/port_engine.h b/libs/ardour/ardour/port_engine.h index 8c0ec9e754..16d3da3576 100644 --- a/libs/ardour/ardour/port_engine.h +++ b/libs/ardour/ardour/port_engine.h @@ -26,6 +26,7 @@ #include #include "ardour/data_type.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -74,7 +75,7 @@ class PortManager; * documentation, on which this entire object is based. */ -class PortEngine { +class LIBARDOUR_API PortEngine { public: PortEngine (PortManager& pm) : manager (pm) {} virtual ~PortEngine() {} diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h index abd9fb73cc..327080984a 100644 --- a/libs/ardour/ardour/port_insert.h +++ b/libs/ardour/ardour/port_insert.h @@ -26,6 +26,7 @@ #include "ardour/ardour.h" #include "ardour/io_processor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -41,7 +42,7 @@ class Pannable; /** Port inserts: send output to a Jack port, pick up input at a Jack port */ -class PortInsert : public IOProcessor +class LIBARDOUR_API PortInsert : public IOProcessor { public: PortInsert (Session&, boost::shared_ptr, boost::shared_ptr mm); diff --git a/libs/ardour/ardour/port_manager.h b/libs/ardour/ardour/port_manager.h index ba15142d83..b36e98fe64 100644 --- a/libs/ardour/ardour/port_manager.h +++ b/libs/ardour/ardour/port_manager.h @@ -40,7 +40,7 @@ namespace ARDOUR { class PortEngine; class AudioBackend; -class PortManager +class LIBARDOUR_API PortManager { public: typedef std::map > Ports; diff --git a/libs/ardour/ardour/port_set.h b/libs/ardour/ardour/port_set.h index 690875cd86..cd76f75ee3 100644 --- a/libs/ardour/ardour/port_set.h +++ b/libs/ardour/ardour/port_set.h @@ -39,7 +39,7 @@ class MidiPort; * and once in a vector of all port (_all_ports). This is to speed up the * fairly common case of iterating over all ports. */ -class PortSet : public boost::noncopyable { +class LIBARDOUR_API PortSet : public boost::noncopyable { public: PortSet(); diff --git a/libs/ardour/ardour/process_thread.h b/libs/ardour/ardour/process_thread.h index f96595fbbf..779fdaea2d 100644 --- a/libs/ardour/ardour/process_thread.h +++ b/libs/ardour/ardour/process_thread.h @@ -23,6 +23,7 @@ #include #include "ardour/chan_count.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -30,7 +31,7 @@ namespace ARDOUR { class ThreadBuffers; class BufferSet; -class ProcessThread +class LIBARDOUR_API ProcessThread { public: ProcessThread (); diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 18f13dbc78..85d466a169 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -30,6 +30,7 @@ #include "ardour/buffer_set.h" #include "ardour/latent.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/automatable.h" @@ -41,7 +42,7 @@ class Session; class Route; /** A mixer strip element - plugin, send, meter, etc */ -class Processor : public SessionObject, public Automatable, public Latent +class LIBARDOUR_API Processor : public SessionObject, public Automatable, public Latent { public: static const std::string state_node_name; diff --git a/libs/ardour/ardour/profile.h b/libs/ardour/ardour/profile.h index 5d4e611833..b315748630 100644 --- a/libs/ardour/ardour/profile.h +++ b/libs/ardour/ardour/profile.h @@ -23,9 +23,11 @@ #include #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class RuntimeProfile { +class LIBARDOUR_API RuntimeProfile { public: enum Element { SmallScreen, diff --git a/libs/ardour/ardour/progress.h b/libs/ardour/ardour/progress.h index 10b7d75960..79043a31ee 100644 --- a/libs/ardour/ardour/progress.h +++ b/libs/ardour/ardour/progress.h @@ -22,10 +22,12 @@ #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** A class to handle reporting of progress of something */ -class Progress +class LIBARDOUR_API Progress { public: Progress (); diff --git a/libs/ardour/ardour/proxy_controllable.h b/libs/ardour/ardour/proxy_controllable.h index 169f60f9f5..066f2aac81 100644 --- a/libs/ardour/ardour/proxy_controllable.h +++ b/libs/ardour/ardour/proxy_controllable.h @@ -30,7 +30,7 @@ namespace ARDOUR { so that it can be used like a regular Controllable, bound to MIDI, OSC etc. */ -class ProxyControllable : public PBD::Controllable { +class LIBARDOUR_API ProxyControllable : public PBD::Controllable { public: ProxyControllable (const std::string& name, PBD::Controllable::Flag flags, boost::function1 setter, diff --git a/libs/ardour/ardour/public_diskstream.h b/libs/ardour/ardour/public_diskstream.h index 125e1a21ce..5b5cd48231 100644 --- a/libs/ardour/ardour/public_diskstream.h +++ b/libs/ardour/ardour/public_diskstream.h @@ -27,7 +27,7 @@ class Source; class Location; /** Public interface to a Diskstream */ -class PublicDiskstream +class LIBARDOUR_API PublicDiskstream { public: virtual ~PublicDiskstream() {} diff --git a/libs/ardour/ardour/quantize.h b/libs/ardour/ardour/quantize.h index e56927767e..c41d172177 100644 --- a/libs/ardour/ardour/quantize.h +++ b/libs/ardour/ardour/quantize.h @@ -21,6 +21,7 @@ #ifndef __ardour_quantize_h__ #define __ardour_quantize_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/midi_operator.h" @@ -28,7 +29,7 @@ namespace ARDOUR { class Session; -class Quantize : public MidiOperator { +class LIBARDOUR_API Quantize : public MidiOperator { public: Quantize (ARDOUR::Session&, bool snap_start, bool snap_end, double start_grid, double end_grid, diff --git a/libs/ardour/ardour/rb_effect.h b/libs/ardour/ardour/rb_effect.h index 1d36f31332..6c10278fb3 100644 --- a/libs/ardour/ardour/rb_effect.h +++ b/libs/ardour/ardour/rb_effect.h @@ -27,7 +27,7 @@ namespace ARDOUR { class AudioRegion; -class RBEffect : public Filter { +class LIBARDOUR_API RBEffect : public Filter { public: RBEffect (ARDOUR::Session&, TimeFXRequest&); ~RBEffect (); diff --git a/libs/ardour/ardour/rc_configuration.h b/libs/ardour/ardour/rc_configuration.h index e2f68477a1..b525a8269e 100644 --- a/libs/ardour/ardour/rc_configuration.h +++ b/libs/ardour/ardour/rc_configuration.h @@ -23,6 +23,7 @@ #include #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/utils.h" #include "ardour/configuration.h" @@ -31,7 +32,7 @@ class XMLNode; namespace ARDOUR { -class RCConfiguration : public Configuration +class LIBARDOUR_API RCConfiguration : public Configuration { public: RCConfiguration(); diff --git a/libs/ardour/ardour/readable.h b/libs/ardour/ardour/readable.h index d184902deb..18190436df 100644 --- a/libs/ardour/ardour/readable.h +++ b/libs/ardour/ardour/readable.h @@ -20,11 +20,12 @@ #ifndef __ardour_readable_h__ #define __ardour_readable_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { -class Readable { +class LIBARDOUR_API Readable { public: Readable () {} virtual ~Readable() {} diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 3ee829ed12..fac89bb4ff 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -38,7 +38,6 @@ class XMLNode; - namespace ARDOUR { namespace Properties { @@ -74,14 +73,14 @@ class Filter; class ExportSpecification; class Progress; -enum RegionEditState { +enum LIBARDOUR_API RegionEditState { EditChangesNothing = 0, EditChangesName = 1, EditChangesID = 2 }; -class Region +class LIBARDOUR_API Region : public SessionObject , public boost::enable_shared_from_this , public Readable diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index ed0c962d87..a9b73dc462 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -28,6 +28,7 @@ #include "pbd/property_list.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" class XMLNode; @@ -38,7 +39,7 @@ namespace ARDOUR { class Session; class AudioRegion; -class RegionFactory { +class LIBARDOUR_API RegionFactory { public: typedef std::map > RegionMap; diff --git a/libs/ardour/ardour/region_sorters.h b/libs/ardour/ardour/region_sorters.h index baa3a3417d..9fd739a4da 100644 --- a/libs/ardour/ardour/region_sorters.h +++ b/libs/ardour/ardour/region_sorters.h @@ -24,13 +24,13 @@ namespace ARDOUR { -struct RegionSortByPosition { +struct LIBARDOUR_API RegionSortByPosition { bool operator() (boost::shared_ptr a, boost::shared_ptr b) { return a->position() < b->position(); } }; -struct RegionSortByLayer { +struct LIBARDOUR_API RegionSortByLayer { bool operator() (boost::shared_ptr a, boost::shared_ptr b) { return a->layer() < b->layer(); } diff --git a/libs/ardour/ardour/resampled_source.h b/libs/ardour/ardour/resampled_source.h index a36ad4331f..bb088f36fb 100644 --- a/libs/ardour/ardour/resampled_source.h +++ b/libs/ardour/ardour/resampled_source.h @@ -22,12 +22,13 @@ #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" namespace ARDOUR { -class ResampledImportableSource : public ImportableSource +class LIBARDOUR_API ResampledImportableSource : public ImportableSource { public: ResampledImportableSource (boost::shared_ptr, framecnt_t rate, SrcQuality); diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h index 6dcd6ac2fc..45bb5573b2 100644 --- a/libs/ardour/ardour/return.h +++ b/libs/ardour/ardour/return.h @@ -34,7 +34,7 @@ class Amp; class PeakMeter; -class Return : public IOProcessor +class LIBARDOUR_API Return : public IOProcessor { public: Return (Session&, bool internal = false); diff --git a/libs/ardour/ardour/reverse.h b/libs/ardour/ardour/reverse.h index edc72ce707..4c24a7c1cb 100644 --- a/libs/ardour/ardour/reverse.h +++ b/libs/ardour/ardour/reverse.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class Reverse : public Filter { +class LIBARDOUR_API Reverse : public Filter { public: Reverse (ARDOUR::Session&); ~Reverse (); diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 23f24cb275..a7eeace7b4 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -43,6 +43,7 @@ #include "ardour/ardour.h" #include "ardour/instrument_info.h" #include "ardour/io.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/mute_master.h" #include "ardour/route_group_member.h" @@ -67,7 +68,7 @@ class Pannable; class CapturingProcessor; class InternalSend; -class Route : public SessionObject, public Automatable, public RouteGroupMember, public GraphNode, public boost::enable_shared_from_this +class LIBARDOUR_API Route : public SessionObject, public Automatable, public RouteGroupMember, public GraphNode, public boost::enable_shared_from_this { public: diff --git a/libs/ardour/ardour/route_graph.h b/libs/ardour/ardour/route_graph.h index 0b0af6c7dd..77e74ceafd 100644 --- a/libs/ardour/ardour/route_graph.h +++ b/libs/ardour/ardour/route_graph.h @@ -37,7 +37,7 @@ typedef boost::shared_ptr GraphVertex; * * This may be a premature optimisation... */ -class GraphEdges +class LIBARDOUR_API GraphEdges { public: typedef std::map > EdgeMap; diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h index 2f62193d83..fd4be69c64 100644 --- a/libs/ardour/ardour/route_group.h +++ b/libs/ardour/ardour/route_group.h @@ -29,6 +29,7 @@ #include "pbd/stateful.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_object.h" @@ -54,7 +55,7 @@ class Track; class AudioTrack; class Session; -class RouteGroup : public SessionObject +class LIBARDOUR_API RouteGroup : public SessionObject { public: static void make_property_quarks(); diff --git a/libs/ardour/ardour/route_group_member.h b/libs/ardour/ardour/route_group_member.h index 2665c719e6..b0368cb240 100644 --- a/libs/ardour/ardour/route_group_member.h +++ b/libs/ardour/ardour/route_group_member.h @@ -26,7 +26,7 @@ namespace ARDOUR { class RouteGroup; -class RouteGroupMember +class LIBARDOUR_API RouteGroupMember { public: RouteGroupMember () : _route_group (0) {} diff --git a/libs/ardour/ardour/runtime_functions.h b/libs/ardour/ardour/runtime_functions.h index 8882d721d7..f55d6ba55d 100644 --- a/libs/ardour/ardour/runtime_functions.h +++ b/libs/ardour/ardour/runtime_functions.h @@ -20,6 +20,7 @@ #ifndef __ardour_runtime_functions_h__ #define __ardour_runtime_functions_h__ +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 1a21d1d050..5c15a17228 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -32,7 +32,7 @@ namespace ARDOUR { class PeakMeter; class Amp; -class Send : public Delivery +class LIBARDOUR_API Send : public Delivery { public: Send (Session&, boost::shared_ptr pannable, boost::shared_ptr, Delivery::Role r = Delivery::Send); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 0f4e04715a..5b0cf755a7 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -140,7 +140,7 @@ class WindowsVSTPlugin; extern void setup_enum_writer (); -class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager +class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager { public: enum RecordState { diff --git a/libs/ardour/ardour/session_configuration.h b/libs/ardour/ardour/session_configuration.h index 46d6defa7d..e72d19f322 100644 --- a/libs/ardour/ardour/session_configuration.h +++ b/libs/ardour/ardour/session_configuration.h @@ -24,7 +24,7 @@ namespace ARDOUR { -class SessionConfiguration : public Configuration +class LIBARDOUR_API SessionConfiguration : public Configuration { public: SessionConfiguration (); diff --git a/libs/ardour/ardour/session_directory.h b/libs/ardour/ardour/session_directory.h index a4c372d6ed..685f0870dd 100644 --- a/libs/ardour/ardour/session_directory.h +++ b/libs/ardour/ardour/session_directory.h @@ -22,9 +22,11 @@ #include #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class SessionDirectory +class LIBARDOUR_API SessionDirectory { public: diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index ccec43d909..d4102a62ef 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -28,6 +28,7 @@ #include "pbd/ringbuffer.h" #include "pbd/event_loop.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -35,7 +36,7 @@ namespace ARDOUR { class Slave; class Region; -class SessionEvent { +class LIBARDOUR_API SessionEvent { public: enum Type { SetTransportSpeed, @@ -150,7 +151,7 @@ private: friend class Butler; }; -class SessionEventManager { +class LIBARDOUR_API SessionEventManager { public: SessionEventManager () : pending_events (2048), auto_loop_event(0), punch_out_event(0), punch_in_event(0) {} diff --git a/libs/ardour/ardour/session_handle.h b/libs/ardour/ardour/session_handle.h index 0331970e5c..330f1805cd 100644 --- a/libs/ardour/ardour/session_handle.h +++ b/libs/ardour/ardour/session_handle.h @@ -22,10 +22,12 @@ #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { class Session; -class SessionHandleRef : public PBD::ScopedConnectionList +class LIBARDOUR_API SessionHandleRef : public PBD::ScopedConnectionList { public: SessionHandleRef (ARDOUR::Session& s); @@ -37,7 +39,7 @@ class SessionHandleRef : public PBD::ScopedConnectionList virtual void insanity_check (); }; -class SessionHandlePtr +class LIBARDOUR_API SessionHandlePtr { public: SessionHandlePtr (ARDOUR::Session* s); diff --git a/libs/ardour/ardour/session_metadata.h b/libs/ardour/ardour/session_metadata.h index c4341dbc61..b163e98f65 100644 --- a/libs/ardour/ardour/session_metadata.h +++ b/libs/ardour/ardour/session_metadata.h @@ -28,13 +28,15 @@ #include "pbd/statefuldestructible.h" #include "pbd/xml++.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** Represents metadata associated to a Session * Metadata can be accessed and edited via this class. * Exported files can also be tagged with this data. */ -class SessionMetadata : public PBD::StatefulDestructible +class LIBARDOUR_API SessionMetadata : public PBD::StatefulDestructible { public: //singleton instance: diff --git a/libs/ardour/ardour/session_object.h b/libs/ardour/ardour/session_object.h index eacb0c49e9..21bb10f225 100644 --- a/libs/ardour/ardour/session_object.h +++ b/libs/ardour/ardour/session_object.h @@ -40,7 +40,7 @@ class Session; expected to be destroyed before the session calls drop_references(). */ -class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible +class LIBARDOUR_API SessionObject : public SessionHandleRef, public PBD::StatefulDestructible { public: static void make_property_quarks (); diff --git a/libs/ardour/ardour/session_playlists.h b/libs/ardour/ardour/session_playlists.h index 83dc8ee58c..e7ad1624dd 100644 --- a/libs/ardour/ardour/session_playlists.h +++ b/libs/ardour/ardour/session_playlists.h @@ -44,7 +44,7 @@ class Session; class Crossfade; class Track; -class SessionPlaylists : public PBD::ScopedConnectionList +class LIBARDOUR_API SessionPlaylists : public PBD::ScopedConnectionList { public: ~SessionPlaylists (); diff --git a/libs/ardour/ardour/silentfilesource.h b/libs/ardour/ardour/silentfilesource.h index 5cdade3751..27d0efd994 100644 --- a/libs/ardour/ardour/silentfilesource.h +++ b/libs/ardour/ardour/silentfilesource.h @@ -25,7 +25,7 @@ namespace ARDOUR { -class SilentFileSource : public AudioFileSource { +class LIBARDOUR_API SilentFileSource : public AudioFileSource { public: int update_header (framepos_t /*when*/, struct tm&, time_t) { return 0; } int flush_header () { return 0; } diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h index a0b7b878e4..faeb3be357 100644 --- a/libs/ardour/ardour/slave.h +++ b/libs/ardour/ardour/slave.h @@ -31,6 +31,7 @@ #include "timecode/time.h" #include "ltc/ltc.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "midi++/parser.h" #include "midi++/types.h" @@ -59,7 +60,7 @@ class MidiPort; * Therefore it is rather that class, that makes ARDOUR a slave by connecting it * to its external time master. */ -class Slave { +class LIBARDOUR_API Slave { public: Slave() { } virtual ~Slave() {} @@ -180,7 +181,7 @@ class Slave { }; /// We need this wrapper for testability, it's just too hard to mock up a session class -class ISlaveSessionProxy { +class LIBARDOUR_API ISlaveSessionProxy { public: virtual ~ISlaveSessionProxy() {} virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); } @@ -198,7 +199,7 @@ class ISlaveSessionProxy { /// The Session Proxy for use in real Ardour -class SlaveSessionProxy : public ISlaveSessionProxy { +class LIBARDOUR_API SlaveSessionProxy : public ISlaveSessionProxy { Session& session; public: @@ -215,7 +216,7 @@ class SlaveSessionProxy : public ISlaveSessionProxy { void request_transport_speed (double speed); }; -struct SafeTime { +struct LIBARDOUR_API SafeTime { volatile int guard1; framepos_t position; framepos_t timestamp; @@ -231,7 +232,7 @@ struct SafeTime { } }; -class TimecodeSlave : public Slave { +class LIBARDOUR_API TimecodeSlave : public Slave { public: TimecodeSlave () {} @@ -248,7 +249,7 @@ class TimecodeSlave : public Slave { bool timecode_negative_offset; }; -class MTC_Slave : public TimecodeSlave { +class LIBARDOUR_API MTC_Slave : public TimecodeSlave { public: MTC_Slave (Session&, MidiPort&); ~MTC_Slave (); @@ -332,7 +333,7 @@ class MTC_Slave : public TimecodeSlave { void parameter_changed(std::string const & p); }; -class LTC_Slave : public TimecodeSlave { +class LIBARDOUR_API LTC_Slave : public TimecodeSlave { public: LTC_Slave (Session&); ~LTC_Slave (); @@ -400,7 +401,7 @@ public: double b, c; ///< DLL filter coefficients }; -class MIDIClock_Slave : public Slave { +class LIBARDOUR_API MIDIClock_Slave : public Slave { public: MIDIClock_Slave (Session&, MidiPort&, int ppqn = 24); @@ -486,7 +487,7 @@ class MIDIClock_Slave : public Slave { bool _starting; }; -class Engine_Slave : public Slave +class LIBARDOUR_API Engine_Slave : public Slave { public: Engine_Slave (AudioEngine&); diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h index ca337a62c2..82e6252b45 100644 --- a/libs/ardour/ardour/smf_source.h +++ b/libs/ardour/ardour/smf_source.h @@ -34,7 +34,7 @@ namespace ARDOUR { template class MidiRingBuffer; /** Standard Midi File (Type 0) Source */ -class SMFSource : public MidiSource, public FileSource, public Evoral::SMF { +class LIBARDOUR_API SMFSource : public MidiSource, public FileSource, public Evoral::SMF { public: /** Constructor for existing external-to-session files */ SMFSource (Session& session, const std::string& path, diff --git a/libs/ardour/ardour/sndfileimportable.h b/libs/ardour/ardour/sndfileimportable.h index 8612e264c4..10c429c545 100644 --- a/libs/ardour/ardour/sndfileimportable.h +++ b/libs/ardour/ardour/sndfileimportable.h @@ -22,12 +22,13 @@ #include #include +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" namespace ARDOUR { -class SndFileImportableSource : public ImportableSource { +class LIBARDOUR_API SndFileImportableSource : public ImportableSource { public: SndFileImportableSource (const std::string& path); virtual ~SndFileImportableSource(); diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h index 3f63f1c598..9b3da1701d 100644 --- a/libs/ardour/ardour/sndfilesource.h +++ b/libs/ardour/ardour/sndfilesource.h @@ -28,7 +28,7 @@ namespace ARDOUR { -class SndFileSource : public AudioFileSource { +class LIBARDOUR_API SndFileSource : public AudioFileSource { public: /** Constructor to be called for existing external-to-session files */ SndFileSource (Session&, const std::string& path, int chn, Flag flags); diff --git a/libs/ardour/ardour/soundseq.h b/libs/ardour/ardour/soundseq.h index ff8e96ad8f..02425a71cf 100644 --- a/libs/ardour/ardour/soundseq.h +++ b/libs/ardour/ardour/soundseq.h @@ -26,21 +26,21 @@ namespace ARDOUR { typedef gint16 peak_datum; -struct peak_data_t { +struct LIBARDOUR_API peak_data_t { peak_datum min; peak_datum max; }; const uint32_t frames_per_peak = 2048; -class Sound : public EDL::Piece { +class LIBARDOUR_API Sound : public EDL::Piece { public: int peak (peak_data_t& pk, uint32_t start, uint32_t cnt); int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt); int build_peak (uint32_t first_frame, uint32_t cnt); }; -class SoundPlaylist : public EDL::Playlist { +class LIBARDOUR_API SoundPlaylist : public EDL::Playlist { public: int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt); }; diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h index 5e851702d4..78b3cfaa21 100644 --- a/libs/ardour/ardour/source.h +++ b/libs/ardour/ardour/source.h @@ -36,7 +36,7 @@ namespace ARDOUR { class Session; -class Source : public SessionObject +class LIBARDOUR_API Source : public SessionObject { public: enum Flag { diff --git a/libs/ardour/ardour/source_factory.h b/libs/ardour/ardour/source_factory.h index c94f783b44..4ef2cd60ee 100644 --- a/libs/ardour/ardour/source_factory.h +++ b/libs/ardour/ardour/source_factory.h @@ -36,7 +36,7 @@ class Session; class AudioSource; class Playlist; -class SourceFactory { +class LIBARDOUR_API SourceFactory { public: static void init (); diff --git a/libs/ardour/ardour/speaker.h b/libs/ardour/ardour/speaker.h index 3deeb8b0d9..c643eb5d02 100644 --- a/libs/ardour/ardour/speaker.h +++ b/libs/ardour/ardour/speaker.h @@ -22,9 +22,11 @@ #include "pbd/cartesian.h" #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class Speaker { +class LIBARDOUR_API Speaker { public: Speaker (int, const PBD::AngularVector& position); Speaker (const Speaker &); diff --git a/libs/ardour/ardour/speakers.h b/libs/ardour/ardour/speakers.h index dbe4ef180e..cde2c40dbb 100644 --- a/libs/ardour/ardour/speakers.h +++ b/libs/ardour/ardour/speakers.h @@ -31,7 +31,7 @@ class XMLNode; namespace ARDOUR { -class Speakers : public PBD::Stateful { +class LIBARDOUR_API Speakers : public PBD::Stateful { public: Speakers (); Speakers (const Speakers&); diff --git a/libs/ardour/ardour/spline.h b/libs/ardour/ardour/spline.h index 6a12e96d52..475441fd44 100644 --- a/libs/ardour/ardour/spline.h +++ b/libs/ardour/ardour/spline.h @@ -28,7 +28,7 @@ extern "C" { typedef struct _spline Spline; typedef struct _spline_point SplinePoint; -struct _spline_point +struct LIBARDOUR_API _spline_point { float x; float y; @@ -45,7 +45,7 @@ void spline_fill (Spline *, float x0, float x1, float *vec, uint32_t veclen); float spline_get_max_x (Spline *); float spline_get_min_x (Spline *); -struct _spline +struct LIBARDOUR_API _spline { float *deriv2; float *x; diff --git a/libs/ardour/ardour/stretch.h b/libs/ardour/ardour/stretch.h index 066ed7861a..edca5fc44b 100644 --- a/libs/ardour/ardour/stretch.h +++ b/libs/ardour/ardour/stretch.h @@ -33,7 +33,7 @@ namespace ARDOUR { -class RBStretch : public RBEffect { +class LIBARDOUR_API RBStretch : public RBEffect { public: RBStretch (ARDOUR::Session&, TimeFXRequest&); ~RBStretch() {} @@ -47,7 +47,7 @@ class RBStretch : public RBEffect { namespace ARDOUR { -class STStretch : public Filter { +class LIBARDOUR_API STStretch : public Filter { public: STStretch (ARDOUR::Session&, TimeFXRequest&); ~STStretch (); diff --git a/libs/ardour/ardour/strip_silence.h b/libs/ardour/ardour/strip_silence.h index eed4320173..59f4ea0a57 100644 --- a/libs/ardour/ardour/strip_silence.h +++ b/libs/ardour/ardour/strip_silence.h @@ -22,7 +22,7 @@ namespace ARDOUR { /// A filter to strip silence from regions -class StripSilence : public Filter +class LIBARDOUR_API StripSilence : public Filter { public: StripSilence (Session &, const AudioIntervalMap&, framecnt_t fade_length); diff --git a/libs/ardour/ardour/tape_file_matcher.h b/libs/ardour/ardour/tape_file_matcher.h index 6c8392f46f..623bd406a8 100644 --- a/libs/ardour/ardour/tape_file_matcher.h +++ b/libs/ardour/ardour/tape_file_matcher.h @@ -23,9 +23,11 @@ #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -class TapeFileMatcher +class LIBARDOUR_API TapeFileMatcher { public: diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index bedc825288..8fa5ed45a0 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -45,7 +45,7 @@ class Meter; class TempoMap; /** Tempo, the speed at which musical time progresses (BPM). */ -class Tempo { +class LIBARDOUR_API Tempo { public: Tempo (double bpm, double type=4.0) // defaulting to quarter note : _beats_per_minute (bpm), _note_type(type) {} @@ -62,7 +62,7 @@ class Tempo { }; /** Meter, or time signature (beats per bar, and which note type is a beat). */ -class Meter { +class LIBARDOUR_API Meter { public: Meter (double dpb, double bt) : _divisions_per_bar (dpb), _note_type (bt) {} @@ -87,7 +87,7 @@ class Meter { }; /** A section of timeline with a certain Tempo or Meter. */ -class MetricSection { +class LIBARDOUR_API MetricSection { public: MetricSection (const Timecode::BBT_Time& start) : _start (start), _frame (0), _movable (true) {} @@ -123,7 +123,7 @@ class MetricSection { }; /** A section of timeline with a certain Meter. */ -class MeterSection : public MetricSection, public Meter { +class LIBARDOUR_API MeterSection : public MetricSection, public Meter { public: MeterSection (const Timecode::BBT_Time& start, double bpb, double note_type) : MetricSection (start), Meter (bpb, note_type) {} @@ -137,7 +137,7 @@ class MeterSection : public MetricSection, public Meter { }; /** A section of timeline with a certain Tempo. */ -class TempoSection : public MetricSection, public Tempo { +class LIBARDOUR_API TempoSection : public MetricSection, public Tempo { public: TempoSection (const Timecode::BBT_Time& start, double qpm, double note_type) : MetricSection (start), Tempo (qpm, note_type), _bar_offset (-1.0) {} @@ -170,7 +170,7 @@ typedef std::list Metrics; /** Helper class to keep track of the Meter *AND* Tempo in effect at a given point in time. */ -class TempoMetric { +class LIBARDOUR_API TempoMetric { public: TempoMetric (const Meter& m, const Tempo& t) : _meter (&m), _tempo (&t), _frame (0) {} @@ -205,7 +205,7 @@ class TempoMetric { Timecode::BBT_Time _start; }; -class TempoMap : public PBD::StatefulDestructible +class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible { public: TempoMap (framecnt_t frame_rate); diff --git a/libs/ardour/ardour/tempo_map_importer.h b/libs/ardour/ardour/tempo_map_importer.h index 57c7402781..28a65218c7 100644 --- a/libs/ardour/ardour/tempo_map_importer.h +++ b/libs/ardour/ardour/tempo_map_importer.h @@ -32,14 +32,14 @@ namespace ARDOUR { class Session; -class TempoMapImportHandler : public ElementImportHandler +class LIBARDOUR_API TempoMapImportHandler : public ElementImportHandler { public: TempoMapImportHandler (XMLTree const & source, Session & session); std::string get_info () const; }; -class TempoMapImporter : public ElementImporter +class LIBARDOUR_API TempoMapImporter : public ElementImporter { private: typedef boost::shared_ptr XMLNodePtr; diff --git a/libs/ardour/ardour/thread_buffers.h b/libs/ardour/ardour/thread_buffers.h index 9d92454887..f30476a474 100644 --- a/libs/ardour/ardour/thread_buffers.h +++ b/libs/ardour/ardour/thread_buffers.h @@ -23,13 +23,14 @@ #include #include "ardour/chan_count.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { class BufferSet; -class ThreadBuffers { +class LIBARDOUR_API ThreadBuffers { public: ThreadBuffers (); ~ThreadBuffers (); diff --git a/libs/ardour/ardour/ticker.h b/libs/ardour/ardour/ticker.h index 7f0d1987fc..0e5c3c80f4 100644 --- a/libs/ardour/ardour/ticker.h +++ b/libs/ardour/ardour/ticker.h @@ -23,6 +23,7 @@ #include "pbd/signals.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/session_handle.h" @@ -35,7 +36,7 @@ namespace ARDOUR { class Session; class MidiPort; -class MidiClockTicker : public SessionHandlePtr, boost::noncopyable +class LIBARDOUR_API MidiClockTicker : public SessionHandlePtr, boost::noncopyable { public: MidiClockTicker (); diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index bdf420763b..2a6d3f7ad4 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -35,7 +35,7 @@ class Region; class Diskstream; class IO; -class Track : public Route, public PublicDiskstream +class LIBARDOUR_API Track : public Route, public PublicDiskstream { public: Track (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO); diff --git a/libs/ardour/ardour/transient_detector.h b/libs/ardour/ardour/transient_detector.h index 322e4cbc75..0e07c5851a 100644 --- a/libs/ardour/ardour/transient_detector.h +++ b/libs/ardour/ardour/transient_detector.h @@ -28,7 +28,7 @@ class AudioSource; class Readable; class Session; -class TransientDetector : public AudioAnalyser +class LIBARDOUR_API TransientDetector : public AudioAnalyser { public: TransientDetector (float sample_rate); diff --git a/libs/ardour/ardour/trimmable.h b/libs/ardour/ardour/trimmable.h index 071e3d151a..07e2c809a3 100644 --- a/libs/ardour/ardour/trimmable.h +++ b/libs/ardour/ardour/trimmable.h @@ -22,7 +22,7 @@ namespace ARDOUR { -class Trimmable { +class LIBARDOUR_API Trimmable { public: Trimmable() {} virtual ~Trimmable() {} diff --git a/libs/ardour/ardour/unknown_processor.h b/libs/ardour/ardour/unknown_processor.h index 61a5734df2..50234e8294 100644 --- a/libs/ardour/ardour/unknown_processor.h +++ b/libs/ardour/ardour/unknown_processor.h @@ -39,7 +39,7 @@ namespace ARDOUR { * session on a machine without a particular plugin will not corrupt * the session. */ -class UnknownProcessor : public Processor +class LIBARDOUR_API UnknownProcessor : public Processor { public: UnknownProcessor (Session &, XMLNode const &); diff --git a/libs/ardour/ardour/uri_map.h b/libs/ardour/ardour/uri_map.h index 18008f0df2..a948ea4002 100644 --- a/libs/ardour/ardour/uri_map.h +++ b/libs/ardour/ardour/uri_map.h @@ -28,6 +28,8 @@ #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" #include "lv2/lv2plug.in/ns/ext/urid/urid.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** Implementation of the LV2 uri-map and urid extensions. @@ -35,7 +37,7 @@ namespace ARDOUR { * This just uses a pair of std::map and is not so great in the space overhead * department, but it's fast enough and not really performance critical anyway. */ -class URIMap : public boost::noncopyable { +class LIBARDOUR_API URIMap : public boost::noncopyable { public: URIMap(); diff --git a/libs/ardour/ardour/user_bundle.h b/libs/ardour/ardour/user_bundle.h index 5ecfe521f5..4ff435ef35 100644 --- a/libs/ardour/ardour/user_bundle.h +++ b/libs/ardour/ardour/user_bundle.h @@ -29,7 +29,7 @@ namespace ARDOUR { class Session; -class UserBundle : public Bundle, public PBD::Stateful { +class LIBARDOUR_API UserBundle : public Bundle, public PBD::Stateful { public: UserBundle (std::string const &); diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h index bf91d4d57e..f0030557e9 100644 --- a/libs/ardour/ardour/utils.h +++ b/libs/ardour/ardour/utils.h @@ -32,18 +32,19 @@ #include #endif /* __APPLE__ */ +#include "ardour/libardour_visibility.h" #include "ardour/ardour.h" #include "ardour/data_type.h" #include "ardour/dB.h" class XMLNode; -std::string legalize_for_path (const std::string& str); -std::string legalize_for_universal_path (const std::string& str); -std::string legalize_for_uri (const std::string& str); -std::string legalize_for_path_2X (const std::string& str); -XMLNode* find_named_node (const XMLNode& node, std::string name); -std::string bool_as_string (bool); +LIBARDOUR_API std::string legalize_for_path (const std::string& str); +LIBARDOUR_API std::string legalize_for_universal_path (const std::string& str); +LIBARDOUR_API std::string legalize_for_uri (const std::string& str); +LIBARDOUR_API std::string legalize_for_path_2X (const std::string& str); +LIBARDOUR_API XMLNode* find_named_node (const XMLNode& node, std::string name); +LIBARDOUR_API std::string bool_as_string (bool); static inline float f_max(float x, float a) { x -= a; @@ -54,22 +55,22 @@ static inline float f_max(float x, float a) { return (x); } -std::string bump_name_once(const std::string& s, char delimiter); +LIBARDOUR_API std::string bump_name_once(const std::string& s, char delimiter); -int cmp_nocase (const std::string& s, const std::string& s2); +LIBARDOUR_API int cmp_nocase (const std::string& s, const std::string& s2); -int touch_file(std::string path); +LIBARDOUR_API int touch_file(std::string path); -std::string region_name_from_path (std::string path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); -bool path_is_paired (std::string path, std::string& pair_base); +LIBARDOUR_API std::string region_name_from_path (std::string path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); +LIBARDOUR_API bool path_is_paired (std::string path, std::string& pair_base); -void compute_equal_power_fades (ARDOUR::framecnt_t nframes, float* in, float* out); +LIBARDOUR_API void compute_equal_power_fades (ARDOUR::framecnt_t nframes, float* in, float* out); -const char* sync_source_to_string (ARDOUR::SyncSource src, bool sh = false); -ARDOUR::SyncSource string_to_sync_source (std::string str); +LIBARDOUR_API const char* sync_source_to_string (ARDOUR::SyncSource src, bool sh = false); +LIBARDOUR_API ARDOUR::SyncSource string_to_sync_source (std::string str); -const char* edit_mode_to_string (ARDOUR::EditMode); -ARDOUR::EditMode string_to_edit_mode (std::string); +LIBARDOUR_API const char* edit_mode_to_string (ARDOUR::EditMode); +LIBARDOUR_API ARDOUR::EditMode string_to_edit_mode (std::string); #undef OLD_GAIN_MATH #define OLD_GAIN_MATH @@ -141,8 +142,8 @@ slider_position_to_gain (double pos) } #undef OLD_GAIN_MATH -double gain_to_slider_position_with_max (double g, double max_gain = 2.0); -double slider_position_to_gain_with_max (double g, double max_gain = 2.0); +LIBARDOUR_API double gain_to_slider_position_with_max (double g, double max_gain = 2.0); +LIBARDOUR_API double slider_position_to_gain_with_max (double g, double max_gain = 2.0); /* I don't really like hard-coding these falloff rates here * Probably should use a map of some kind that could be configured @@ -159,17 +160,17 @@ double slider_position_to_gain_with_max (double g, double max_gain = 2.0); #define METER_FALLOFF_FASTER 46.0f #define METER_FALLOFF_FASTEST 70.0f -float meter_falloff_to_float (ARDOUR::MeterFalloff); -ARDOUR::MeterFalloff meter_falloff_from_float (float); -float meter_falloff_to_db_per_sec (float); +LIBARDOUR_API float meter_falloff_to_float (ARDOUR::MeterFalloff); +LIBARDOUR_API ARDOUR::MeterFalloff meter_falloff_from_float (float); +LIBARDOUR_API float meter_falloff_to_db_per_sec (float); -const char* native_header_format_extension (ARDOUR::HeaderFormat, const ARDOUR::DataType& type); -bool matching_unsuffixed_filename_exists_in (const std::string& dir, const std::string& name); +LIBARDOUR_API const char* native_header_format_extension (ARDOUR::HeaderFormat, const ARDOUR::DataType& type); +LIBARDOUR_API bool matching_unsuffixed_filename_exists_in (const std::string& dir, const std::string& name); -uint32_t how_many_dsp_threads (); +LIBARDOUR_API uint32_t how_many_dsp_threads (); #if __APPLE__ -std::string CFStringRefToStdString(CFStringRef stringRef); +LIBARDOUR_API std::string CFStringRefToStdString(CFStringRef stringRef); #endif // __APPLE__ #endif /* __ardour_utils_h__ */ diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index 7ca973cbb7..c6db001dd1 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -22,17 +22,17 @@ #include "ardour/plugin.h" -struct _AEffect; +struct LIBARDOUR_API _AEffect; typedef struct _AEffect AEffect; -struct _VSTHandle; +struct LIBARDOUR_API _VSTHandle; typedef struct _VSTHandle VSTHandle; -struct _VSTState; +struct LIBARDOUR_API _VSTState; typedef struct _VSTState VSTState; namespace ARDOUR { /** Parent class for VST plugins of both Windows and Linux varieties */ -class VSTPlugin : public Plugin +class LIBARDOUR_API VSTPlugin : public Plugin { public: VSTPlugin (AudioEngine &, Session &, VSTHandle *); diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h index d185d62606..47308aff73 100644 --- a/libs/ardour/ardour/vst_types.h +++ b/libs/ardour/ardour/vst_types.h @@ -20,9 +20,10 @@ #ifndef __ardour_vst_types_h__ #define __ardour_vst_types_h__ +#include "ardour/libardour_visibility.h" #include "ardour/vestige/aeffectx.h" -struct _VSTKey +struct LIBARDOUR_API _VSTKey { /** virtual-key code, or 0 if this _VSTFXKey is a `character' key */ int special; @@ -32,7 +33,7 @@ struct _VSTKey typedef struct _VSTKey VSTKey; -struct _VSTInfo +struct LIBARDOUR_API _VSTInfo { char *name; char *creator; @@ -56,7 +57,7 @@ typedef struct _VSTInfo VSTInfo; typedef AEffect * (* main_entry_t) (audioMasterCallback); -struct _VSTHandle +struct LIBARDOUR_API _VSTHandle { void* dll; char* name; @@ -69,7 +70,7 @@ struct _VSTHandle typedef struct _VSTHandle VSTHandle; -struct _VSTState +struct LIBARDOUR_API _VSTState { AEffect* plugin; diff --git a/libs/ardour/ardour/vumeterdsp.h b/libs/ardour/ardour/vumeterdsp.h index 86487e8e8e..f8abc7fa93 100644 --- a/libs/ardour/ardour/vumeterdsp.h +++ b/libs/ardour/ardour/vumeterdsp.h @@ -20,8 +20,9 @@ #ifndef __VUMETERDSP_H #define __VUMETERDSP_H +#include "ardour/libardour_visibility.h" -class Vumeterdsp +class LIBARDOUR_API Vumeterdsp { public: diff --git a/libs/ardour/ardour/windows_vst_plugin.h b/libs/ardour/ardour/windows_vst_plugin.h index 83bc113a00..ee4850dc05 100644 --- a/libs/ardour/ardour/windows_vst_plugin.h +++ b/libs/ardour/ardour/windows_vst_plugin.h @@ -22,7 +22,7 @@ #include "ardour/vst_plugin.h" -struct _VSTHandle; +struct LIBARDOUR_API _VSTHandle; typedef struct _VSTHandle VSTHandle; namespace ARDOUR { @@ -30,7 +30,7 @@ namespace ARDOUR { class AudioEngine; class Session; -class WindowsVSTPlugin : public VSTPlugin +class LIBARDOUR_API WindowsVSTPlugin : public VSTPlugin { public: WindowsVSTPlugin (AudioEngine &, Session &, VSTHandle *); @@ -40,7 +40,7 @@ public: std::string state_node_name () const { return "windows-vst"; } }; -class WindowsVSTPluginInfo : public PluginInfo +class LIBARDOUR_API WindowsVSTPluginInfo : public PluginInfo { public: WindowsVSTPluginInfo (); diff --git a/libs/ardour/ardour/worker.h b/libs/ardour/ardour/worker.h index 4f3ff54bc1..c9ff2f2d7f 100644 --- a/libs/ardour/ardour/worker.h +++ b/libs/ardour/ardour/worker.h @@ -27,12 +27,14 @@ #include "pbd/ringbuffer.h" #include "pbd/semaphore.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { /** An object that needs to schedule non-RT work in the audio thread. */ -class Workee { +class LIBARDOUR_API Workee { public: virtual ~Workee() {} @@ -50,7 +52,7 @@ public: /** A worker thread for non-realtime tasks scheduled in the audio thread. */ -class Worker +class LIBARDOUR_API Worker { public: Worker(Workee* workee, uint32_t ring_size); diff --git a/libs/ardour/cycle_timer.cc b/libs/ardour/cycle_timer.cc index 02d1abb930..bb4f3181e0 100644 --- a/libs/ardour/cycle_timer.cc +++ b/libs/ardour/cycle_timer.cc @@ -22,6 +22,8 @@ #include "pbd/error.h" #include "ardour/cycle_timer.h" +#include "ardour/libardour_visibility.h" + #include "i18n.h" using namespace std; diff --git a/libs/ardour/element_import_handler.cc b/libs/ardour/element_import_handler.cc index c360e82206..8f6483b145 100644 --- a/libs/ardour/element_import_handler.cc +++ b/libs/ardour/element_import_handler.cc @@ -18,6 +18,7 @@ */ +#include "ardour/libardour_visibility.h" #include "ardour/element_import_handler.h" #include diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc index 9e126ed087..f7fe22c3b4 100644 --- a/libs/ardour/export_filename.cc +++ b/libs/ardour/export_filename.cc @@ -19,7 +19,6 @@ */ #include -#include "ardour/export_filename.h" #include #include @@ -28,11 +27,13 @@ #include "pbd/convert.h" #include "pbd/enumwriter.h" +#include "ardour/libardour_visibility.h" #include "ardour/session.h" #include "ardour/session_directory.h" -#include "ardour/export_timespan.h" +#include "ardour/export_filename.h" #include "ardour/export_format_specification.h" #include "ardour/export_channel_configuration.h" +#include "ardour/export_timespan.h" #include "ardour/utils.h" #include "i18n.h" diff --git a/libs/ardour/route_group_member.cc b/libs/ardour/route_group_member.cc index 85d2f981d7..3caa7cd1d0 100644 --- a/libs/ardour/route_group_member.cc +++ b/libs/ardour/route_group_member.cc @@ -16,6 +16,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "ardour/libardour_visibility.h" #include "ardour/route_group_member.h" using namespace ARDOUR; diff --git a/libs/pbd/pbd/fastlog.h b/libs/pbd/pbd/fastlog.h index e8aef4119d..21cbfbdce2 100644 --- a/libs/pbd/pbd/fastlog.h +++ b/libs/pbd/pbd/fastlog.h @@ -12,7 +12,7 @@ as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. #include "pbd/libpbd_visibility.h" -LIBPBD_API static inline float fast_log2 (float val) +static inline float fast_log2 (float val) { /* don't use reinterpret_cast<> because that prevents this from being used by pure C code (for example, GnomeCanvasItems) @@ -31,16 +31,16 @@ LIBPBD_API static inline float fast_log2 (float val) return (val + log_2); } -LIBPBD_API static inline float fast_log (const float val) +static inline float fast_log (const float val) { return (fast_log2 (val) * 0.69314718f); } -LIBPBD_API static inline float fast_log10 (const float val) +static inline float fast_log10 (const float val) { return fast_log2(val) / 3.312500f; } -LIBPBD_API static inline float minus_infinity(void) { return -HUGE_VAL; } +static inline float minus_infinity(void) { return -HUGE_VAL; } #endif /* __pbd_fastlog_h__ */ diff --git a/libs/pbd/pbd/floating.h b/libs/pbd/pbd/floating.h index b03158c277..e5d582625a 100644 --- a/libs/pbd/pbd/floating.h +++ b/libs/pbd/pbd/floating.h @@ -47,7 +47,7 @@ union LIBPBD_API Float_t /* Note: ULPS = Units in the Last Place */ -LIBPBD_API static inline bool floateq (float a, float b, int max_ulps_diff) +static inline bool floateq (float a, float b, int max_ulps_diff) { Float_t ua (a); Float_t ub (b); diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h index ba09225608..6560780f3c 100644 --- a/libs/pbd/pbd/memento_command.h +++ b/libs/pbd/pbd/memento_command.h @@ -50,8 +50,8 @@ * references to non-existant crossfades. To get around this, CrossfadeBinder * can do `just-in-time' binding from the crossfade ID. */ -template LIBPBD_API -class MementoCommandBinder : public PBD::Destructible +template +class LIBPBD_API MementoCommandBinder : public PBD::Destructible { public: /** @return Stateful object to operate on */ @@ -67,8 +67,8 @@ public: }; /** A simple MementoCommandBinder which binds directly to an object */ -template LIBPBD_API -class SimpleMementoCommandBinder : public MementoCommandBinder +template +class LIBPBD_API SimpleMementoCommandBinder : public MementoCommandBinder { public: SimpleMementoCommandBinder (obj_T& o) @@ -99,8 +99,8 @@ private: * (from Stateful::get_state()), so undo becomes restoring the before * memento, and redo is restoring the after memento. */ -template LIBPBD_API -class MementoCommand : public Command +template +class LIBPBD_API MementoCommand : public Command { public: MementoCommand (obj_T& a_object, XMLNode* a_before, XMLNode* a_after) diff --git a/libs/pbd/pbd/stateful_diff_command.h b/libs/pbd/pbd/stateful_diff_command.h index f075a99746..2187c727ed 100644 --- a/libs/pbd/pbd/stateful_diff_command.h +++ b/libs/pbd/pbd/stateful_diff_command.h @@ -29,8 +29,8 @@ namespace PBD { -class LIBPBD_API StatefulDestructible; -class LIBPBD_API PropertyList; +class StatefulDestructible; +class PropertyList; /** A Command which stores its action as the differences between the before and after * state of a Stateful object. From 3e32fb6d48077fe47dd4c066b405a36991fca846 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Oct 2013 10:26:46 -0400 Subject: [PATCH 06/36] remove some unnecessary export macro placements --- libs/ardour/ardour/instrument_info.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ardour/instrument_info.h b/libs/ardour/ardour/instrument_info.h index 5cbcbd53bc..745e4803c0 100644 --- a/libs/ardour/ardour/instrument_info.h +++ b/libs/ardour/ardour/instrument_info.h @@ -33,8 +33,8 @@ namespace MIDI { namespace Name { - class LIBMIDIPP_API ChannelNameSet; - class LIBMIDIPP_API Patch; + class ChannelNameSet; + class Patch; typedef std::list > PatchNameList; } } From 9b7c33096a93015281a04452c874576e1436c313 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Oct 2013 10:27:04 -0400 Subject: [PATCH 07/36] export-ify libmidipp --- libs/midi++2/midi++/channel.h | 2 +- libs/midi++2/midi++/event.h | 1 + libs/midi++2/midi++/ipmidi_port.h | 3 ++- libs/midi++2/midi++/midnam_patch.h | 23 ++++++++++++----------- libs/midi++2/midi++/mmc.h | 5 +++-- libs/midi++2/midi++/parser.h | 3 ++- libs/midi++2/midi++/port.h | 5 +++-- libs/midi++2/midi++/types.h | 10 ++++++---- libs/midi++2/wscript | 3 +++ 9 files changed, 33 insertions(+), 22 deletions(-) diff --git a/libs/midi++2/midi++/channel.h b/libs/midi++2/midi++/channel.h index d00ce700c5..a6ccf56f1d 100644 --- a/libs/midi++2/midi++/channel.h +++ b/libs/midi++2/midi++/channel.h @@ -36,7 +36,7 @@ class Port; * This remembers various useful information about the current 'state' of a * MIDI channel (eg current pitch bend value). */ -class Channel : public PBD::ScopedConnectionList { +class LIBMIDIPP_API Channel : public PBD::ScopedConnectionList { public: Channel (byte channel_number, Port &); diff --git a/libs/midi++2/midi++/event.h b/libs/midi++2/midi++/event.h index 70744536a8..6620010071 100644 --- a/libs/midi++2/midi++/event.h +++ b/libs/midi++2/midi++/event.h @@ -26,6 +26,7 @@ #include #include +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/events.h" #include "pbd/xml++.h" diff --git a/libs/midi++2/midi++/ipmidi_port.h b/libs/midi++2/midi++/ipmidi_port.h index c077170026..5b773d31ac 100644 --- a/libs/midi++2/midi++/ipmidi_port.h +++ b/libs/midi++2/midi++/ipmidi_port.h @@ -48,13 +48,14 @@ #include "pbd/signals.h" #include "pbd/ringbuffer.h" +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/parser.h" #include "midi++/port.h" namespace MIDI { -class IPMIDIPort : public Port { +class LIBMIDIPP_API IPMIDIPort : public Port { public: IPMIDIPort (int base_port = lowest_ipmidi_port_default, const std::string& ifname = std::string()); IPMIDIPort (const XMLNode&); diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h index ddd62c2916..be409bcf8e 100644 --- a/libs/midi++2/midi++/midnam_patch.h +++ b/libs/midi++2/midi++/midnam_patch.h @@ -30,6 +30,7 @@ #include +#include "midi++/libmidi_visibility.h" #include "midi++/event.h" #include "pbd/xml++.h" @@ -39,7 +40,7 @@ namespace MIDI namespace Name { -struct PatchPrimaryKey +struct LIBMIDIPP_API PatchPrimaryKey { public: int bank_number; @@ -81,7 +82,7 @@ public: class PatchBank; -class Patch +class LIBMIDIPP_API Patch { public: @@ -112,7 +113,7 @@ private: typedef std::list > PatchNameList; -class PatchBank +class LIBMIDIPP_API PatchBank { public: PatchBank (uint16_t n = 0, std::string a_name = std::string()) : _name(a_name), _number (n) {}; @@ -138,7 +139,7 @@ private: std::string _patch_list_name; }; -class ChannelNameSet +class LIBMIDIPP_API ChannelNameSet { public: typedef std::set AvailableForChannels; @@ -221,7 +222,7 @@ private: std::ostream& operator<< (std::ostream&, const ChannelNameSet&); -class Note +class LIBMIDIPP_API Note { public: Note() {} @@ -241,7 +242,7 @@ private: std::string _name; }; -class NoteNameList +class LIBMIDIPP_API NoteNameList { public: typedef std::vector< boost::shared_ptr > Notes; @@ -262,7 +263,7 @@ private: Notes _notes; }; -class Control +class LIBMIDIPP_API Control { public: Control() {} @@ -291,7 +292,7 @@ private: std::string _name; }; -class ControlNameList +class LIBMIDIPP_API ControlNameList { public: typedef std::map > Controls; @@ -315,7 +316,7 @@ private: Controls _controls; }; -class CustomDeviceMode +class LIBMIDIPP_API CustomDeviceMode { public: CustomDeviceMode() {}; @@ -341,7 +342,7 @@ private: std::string _channel_name_set_assignments[16]; }; -class MasterDeviceNames +class LIBMIDIPP_API MasterDeviceNames { public: typedef std::set Models; @@ -395,7 +396,7 @@ private: ControlNameLists _control_name_lists; }; -class MIDINameDocument +class LIBMIDIPP_API MIDINameDocument { public: // Maps Model names to MasterDeviceNames diff --git a/libs/midi++2/midi++/mmc.h b/libs/midi++2/midi++/mmc.h index 01f8bf3b8a..2f34b9c793 100644 --- a/libs/midi++2/midi++/mmc.h +++ b/libs/midi++2/midi++/mmc.h @@ -26,6 +26,7 @@ #include "pbd/signals.h" #include "pbd/ringbuffer.h" +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/parser.h" @@ -40,7 +41,7 @@ class Parser; class MachineControlCommand; /** Class to handle incoming and outgoing MIDI machine control messages */ -class MachineControl +class LIBMIDIPP_API MachineControl { public: typedef PBD::Signal1 MMCSignal; @@ -287,7 +288,7 @@ class MachineControl * In an ideal world we might use a class hierarchy for this, but objects of this type * have to be allocated off the stack for RT safety. */ -class MachineControlCommand +class LIBMIDIPP_API MachineControlCommand { public: MachineControlCommand () : _command (MachineControl::Command (0)) {} diff --git a/libs/midi++2/midi++/parser.h b/libs/midi++2/midi++/parser.h index 44897f9d8e..e4126b210b 100644 --- a/libs/midi++2/midi++/parser.h +++ b/libs/midi++2/midi++/parser.h @@ -25,6 +25,7 @@ #include "pbd/signals.h" +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" namespace MIDI { @@ -39,7 +40,7 @@ typedef PBD::Signal2 TwoByteSignal; typedef PBD::Signal2 PitchBendSignal; typedef PBD::Signal3 Signal; -class Parser { +class LIBMIDIPP_API Parser { public: Parser (); ~Parser (); diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h index 6d778beab2..17b660398f 100644 --- a/libs/midi++2/midi++/port.h +++ b/libs/midi++2/midi++/port.h @@ -29,6 +29,7 @@ #include "pbd/signals.h" #include "pbd/ringbuffer.h" +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/parser.h" @@ -37,7 +38,7 @@ namespace MIDI { class Channel; class PortRequest; -class Port { +class LIBMIDIPP_API Port { public: enum Flags { IsInput = JackPortIsInput, @@ -136,7 +137,7 @@ class Port { void init (std::string const &, Flags); }; -struct PortSet { +struct LIBMIDIPP_API PortSet { PortSet (std::string str) : owner (str) { } std::string owner; diff --git a/libs/midi++2/midi++/types.h b/libs/midi++2/midi++/types.h index 185e1e6f3f..a731855daa 100644 --- a/libs/midi++2/midi++/types.h +++ b/libs/midi++2/midi++/types.h @@ -23,6 +23,8 @@ #include #include +#include "midi++/libmidi_visibility.h" + namespace MIDI { typedef char channel_t; @@ -60,10 +62,10 @@ namespace MIDI { reset = 0xFF }; - extern const char *controller_names[]; + LIBMIDIPP_API extern const char *controller_names[]; byte decode_controller_name (const char *name); - struct EventTwoBytes { + struct LIBMIDIPP_API EventTwoBytes { union { byte note_number; byte controller_number; @@ -74,14 +76,14 @@ namespace MIDI { }; }; - enum MTC_FPS { + enum LIBMIDIPP_API MTC_FPS { MTC_24_FPS = 0, MTC_25_FPS = 1, MTC_30_FPS_DROP = 2, MTC_30_FPS = 3 }; - enum MTC_Status { + enum LIBMIDIPP_API MTC_Status { MTC_Stopped = 0, MTC_Forward, MTC_Backward diff --git a/libs/midi++2/wscript b/libs/midi++2/wscript index 0abbab7d40..29b11bdc37 100644 --- a/libs/midi++2/wscript +++ b/libs/midi++2/wscript @@ -62,9 +62,12 @@ def build(bld): # Library if bld.is_defined ('INTERNAL_SHARED_LIBS'): obj = bld.shlib(features = 'cxx cxxshlib', source=libmidi_sources) + obj.defines = [ 'LIBMIDIPP_DLL=1', 'LIBMIDIPP_DLL_EXPORTS=1' ] else: obj = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources) obj.cxxflags = [ '-fPIC', '-DWITH_JACK_MIDI' ] + obj.defines = [] + # everybody loves JACK obj.export_includes = ['.'] obj.includes = ['.', '../surfaces/control_protocol', '../ardour' ] From 92b9fea3d16c3b40bba79858ef346b9f1cd58f8a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Oct 2013 10:51:30 -0400 Subject: [PATCH 08/36] remove a few more misplaced export macros --- libs/ardour/ardour/audio_diskstream.h | 2 +- libs/ardour/ardour/buffer_set.h | 4 ++-- libs/ardour/ardour/element_import_handler.h | 2 +- libs/ardour/ardour/lxvst_plugin.h | 2 +- libs/ardour/ardour/midi_diskstream.h | 2 +- libs/ardour/ardour/vst_plugin.h | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index cb0b5a129f..6741ba0ed4 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -42,7 +42,7 @@ #include "ardour/port.h" #include "ardour/interpolation.h" -struct LIBARDOUR_API tm; +struct tm; namespace ARDOUR { diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index f04e380ed3..617feae269 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -32,9 +32,9 @@ #if defined VST_SUPPORT || defined LXVST_SUPPORT #include "evoral/MIDIEvent.hpp" -struct LIBARDOUR_API _VstEvents; +struct _VstEvents; typedef struct _VstEvents VstEvents; -struct LIBARDOUR_API _VstMidiEvent; +struct _VstMidiEvent; typedef struct _VstMidiEvent VstMidiEvent; #endif diff --git a/libs/ardour/ardour/element_import_handler.h b/libs/ardour/ardour/element_import_handler.h index 167bc1c7b1..32898ec9de 100644 --- a/libs/ardour/ardour/element_import_handler.h +++ b/libs/ardour/ardour/element_import_handler.h @@ -30,7 +30,7 @@ #include "ardour/libardour_visibility.h" #include "pbd/libpbd_visibility.h" -class LIBPBD_API XMLTree; +class XMLTree; namespace ARDOUR { diff --git a/libs/ardour/ardour/lxvst_plugin.h b/libs/ardour/ardour/lxvst_plugin.h index 1eba007790..f1a50b2f30 100644 --- a/libs/ardour/ardour/lxvst_plugin.h +++ b/libs/ardour/ardour/lxvst_plugin.h @@ -22,7 +22,7 @@ #include "ardour/vst_plugin.h" -struct LIBARDOUR_API _VSTHandle; +struct _VSTHandle; typedef struct _VSTHandle VSTHandle; namespace ARDOUR { diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index 1ee54e5995..e3f2673871 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -40,7 +40,7 @@ #include "ardour/midi_ring_buffer.h" #include "ardour/utils.h" -struct LIBARDOUR_API tm; +struct tm; namespace ARDOUR { diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index c6db001dd1..942f7192db 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -22,11 +22,11 @@ #include "ardour/plugin.h" -struct LIBARDOUR_API _AEffect; +struct _AEffect; typedef struct _AEffect AEffect; -struct LIBARDOUR_API _VSTHandle; +struct _VSTHandle; typedef struct _VSTHandle VSTHandle; -struct LIBARDOUR_API _VSTState; +struct _VSTState; typedef struct _VSTState VSTState; namespace ARDOUR { From 94ef2692b895c6979e821811a64c8f4614fb0aac Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Oct 2013 10:52:02 -0400 Subject: [PATCH 09/36] add export control to libevoral --- gtk2_ardour/wscript | 1 + libs/ardour/wscript | 9 ++++++--- libs/evoral/evoral/Control.hpp | 4 +++- libs/evoral/evoral/ControlList.hpp | 6 ++++-- libs/evoral/evoral/ControlSet.hpp | 4 +++- libs/evoral/evoral/Curve.hpp | 6 ++++-- libs/evoral/evoral/Event.hpp | 11 ++++++----- libs/evoral/evoral/EventList.hpp | 4 +++- libs/evoral/evoral/EventRingBuffer.hpp | 3 ++- libs/evoral/evoral/EventSink.hpp | 4 ++-- libs/evoral/evoral/MIDIEvent.hpp | 5 ++++- libs/evoral/evoral/MIDIParameters.hpp | 10 ++++++---- libs/evoral/evoral/Note.hpp | 6 ++++-- libs/evoral/evoral/OldSMF.hpp | 4 +++- libs/evoral/evoral/Parameter.hpp | 4 +++- libs/evoral/evoral/PatchChange.hpp | 5 +++-- libs/evoral/evoral/Range.hpp | 12 +++++++----- libs/evoral/evoral/SMF.hpp | 4 +++- libs/evoral/evoral/SMFReader.hpp | 4 +++- libs/evoral/evoral/Sequence.hpp | 8 +++++--- libs/evoral/evoral/TimeConverter.hpp | 6 ++++-- libs/evoral/evoral/TypeMap.hpp | 3 ++- libs/evoral/evoral/midi_util.h | 4 +++- libs/evoral/evoral/types.hpp | 9 ++++++--- libs/evoral/wscript | 13 ++++++++++--- libs/midi++2/midi++/channel.h | 2 -- 26 files changed, 100 insertions(+), 51 deletions(-) diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 168f0c7358..ddc07fe3e7 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -417,6 +417,7 @@ def build(bld): 'LIBARDOUR_DLL=1', 'LIBARDOUR_CP_DLL=1', 'LIBGTKMM2EXT_DLL=1', + 'LIBEVORAL_DLL=1', ] # continue with setup of obj, which could be a shared library # or an executable. diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 1adc131332..d263785f5d 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -321,11 +321,15 @@ def build(bld): # Library if bld.is_defined ('INTERNAL_SHARED_LIBS'): obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=libardour_sources) + # macros for this shared library + obj.defines = [ 'LIBARDOUR_DLL=1', 'LIBARDOUR_DLL_EXPORTS=1' ] + # macros for this other internal shared libraries that we use + obj.defines += [ 'LIBEVORAL_DLL=1', 'LIBMIDIPP_DLL=1', 'LIBPBD_DLL=1' ] else: obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources) obj.cxxflags = [ '-fPIC' ] obj.cflags = [ '-fPIC' ] - + obj.defines = [] obj.export_includes = ['.'] obj.includes = ['.', '../surfaces/control_protocol', '..'] obj.name = 'ardour' @@ -338,14 +342,13 @@ def build(bld): 'libaudiographer','libltc','libtimecode'] obj.vnum = LIBARDOUR_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - obj.defines = [ + obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"', 'EVORAL_MIDI_XML=1', - 'LIBARDOUR_DLL_EXPORTS=1' ] #obj.source += ' st_stretch.cc st_pitch.cc ' diff --git a/libs/evoral/evoral/Control.hpp b/libs/evoral/evoral/Control.hpp index 369c4df630..2b7fd0aa65 100644 --- a/libs/evoral/evoral/Control.hpp +++ b/libs/evoral/evoral/Control.hpp @@ -23,6 +23,8 @@ #include #include #include "pbd/signals.h" + +#include "evoral/visibility.h" #include "evoral/types.hpp" #include "evoral/Parameter.hpp" @@ -38,7 +40,7 @@ class Transport; * a list of values for automation. */ -class Control +class LIBEVORAL_API Control { public: Control(const Parameter& parameter, boost::shared_ptr); diff --git a/libs/evoral/evoral/ControlList.hpp b/libs/evoral/evoral/ControlList.hpp index 967e08d619..de6eb6e3d9 100644 --- a/libs/evoral/evoral/ControlList.hpp +++ b/libs/evoral/evoral/ControlList.hpp @@ -25,6 +25,8 @@ #include #include #include "pbd/signals.h" + +#include "evoral/visibility.h" #include "evoral/types.hpp" #include "evoral/Range.hpp" #include "evoral/Parameter.hpp" @@ -35,7 +37,7 @@ class Curve; /** A single event (time-stamped value) for a control */ -class ControlEvent { +class LIBEVORAL_API ControlEvent { public: ControlEvent (double w, double v) : when (w), value (v), coeff (0) @@ -67,7 +69,7 @@ public: /** A list (sequence) of time-stamped values for a control */ -class ControlList +class LIBEVORAL_API ControlList { public: typedef std::list EventList; diff --git a/libs/evoral/evoral/ControlSet.hpp b/libs/evoral/evoral/ControlSet.hpp index 716d199fec..57a77afe71 100644 --- a/libs/evoral/evoral/ControlSet.hpp +++ b/libs/evoral/evoral/ControlSet.hpp @@ -25,6 +25,8 @@ #include #include #include "pbd/signals.h" + +#include "evoral/visibility.h" #include "evoral/types.hpp" #include "evoral/Parameter.hpp" #include "evoral/ControlList.hpp" @@ -34,7 +36,7 @@ namespace Evoral { class Control; class ControlEvent; -class ControlSet : public boost::noncopyable { +class LIBEVORAL_API ControlSet : public boost::noncopyable { public: ControlSet(); ControlSet (const ControlSet&); diff --git a/libs/evoral/evoral/Curve.hpp b/libs/evoral/evoral/Curve.hpp index 5719abf2d4..6aeeb039d7 100644 --- a/libs/evoral/evoral/Curve.hpp +++ b/libs/evoral/evoral/Curve.hpp @@ -22,11 +22,13 @@ #include #include +#include "evoral/visibility.h" + namespace Evoral { class ControlList; -class Curve : public boost::noncopyable +class LIBEVORAL_API Curve : public boost::noncopyable { public: Curve (const ControlList& cl); @@ -51,7 +53,7 @@ private: } // namespace Evoral extern "C" { - void curve_get_vector_from_c (void *arg, double, double, float*, int32_t); + LIBEVORAL_API void curve_get_vector_from_c (void *arg, double, double, float*, int32_t); } #endif // EVORAL_CURVE_HPP diff --git a/libs/evoral/evoral/Event.hpp b/libs/evoral/evoral/Event.hpp index 747b795480..facaa64e68 100644 --- a/libs/evoral/evoral/Event.hpp +++ b/libs/evoral/evoral/Event.hpp @@ -25,6 +25,7 @@ #include #include +#include "evoral/visibility.h" #include "evoral/types.hpp" /** If this is not defined, all methods of MidiEvent are RT safe @@ -35,16 +36,16 @@ namespace Evoral { -event_id_t event_id_counter(); -event_id_t next_event_id(); -void init_event_id_counter(event_id_t n); +LIBEVORAL_API event_id_t event_id_counter(); +LIBEVORAL_API event_id_t next_event_id(); +LIBEVORAL_API void init_event_id_counter(event_id_t n); /** An event (much like a type generic jack_midi_event_t) * * Template parameter Time is the type of the time stamp used for this event. */ template -class Event { +class LIBEVORAL_API Event { public: #ifdef EVORAL_EVENT_ALLOC Event (EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false); @@ -157,7 +158,7 @@ protected: template -std::ostream& operator<<(std::ostream& o, const Evoral::Event