diff --git a/libs/pbd/pbd/libpbd_visibility.h b/libs/pbd/pbd/libpbd_visibility.h index e5e0ba22bd..f77eeb15ed 100644 --- a/libs/pbd/pbd/libpbd_visibility.h +++ b/libs/pbd/pbd/libpbd_visibility.h @@ -26,24 +26,32 @@ #define LIBPBD_DLL_LOCAL #define LIBPBD_TEMPLATE_DLL_IMPORT #define LIBPBD_TEMPLATE_DLL_EXPORT + #define LIBPBD_TEMPLATE_MEMBER_DLL_IMPORT __declspec(dllimport) + #define LIBPBD_TEMPLATE_MEMBER_DLL_EXPORT __declspec(dllexport) #else #define LIBPBD_DLL_IMPORT __attribute__ ((visibility ("default"))) #define LIBPBD_DLL_EXPORT __attribute__ ((visibility ("default"))) #define LIBPBD_DLL_LOCAL __attribute__ ((visibility ("hidden"))) #define LIBPBD_TEMPLATE_DLL_IMPORT __attribute__ ((visibility ("default"))) #define LIBPBD_TEMPLATE_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBPBD_TEMPLATE_MEMBER_DLL_IMPORT + #define LIBPBD_TEMPLATE_MEMBER_DLL_EXPORT #endif #ifdef LIBPBD_STATIC // libpbd is a DLL #define LIBPBD_API #define LIBPBD_LOCAL + #define LIBPBD_TEMPLATE_API + #define LIBPBD_TEMPLATE_MEMBER_API #else #ifdef LIBPBD_DLL_EXPORTS // defined if we are building the libpbd DLL (instead of using it) #define LIBPBD_API LIBPBD_DLL_EXPORT #define LIBPBD_TEMPLATE_API LIBPBD_TEMPLATE_DLL_EXPORT + #define LIBPBD_TEMPLATE_MEMBER_API LIBPBD_TEMPLATE_MEMBER_DLL_EXPORT #else #define LIBPBD_API LIBPBD_DLL_IMPORT #define LIBPBD_TEMPLATE_API LIBPBD_TEMPLATE_DLL_IMPORT + #define LIBPBD_TEMPLATE_MEMBER_API LIBPBD_TEMPLATE_MEMBER_DLL_IMPORT #endif #define LIBPBD_LOCAL LIBPBD_DLL_LOCAL #endif diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h index a6af84e2e7..c4e4549ecd 100644 --- a/libs/pbd/pbd/property_basics.h +++ b/libs/pbd/pbd/property_basics.h @@ -38,7 +38,7 @@ class LIBPBD_API StatefulDiffCommand; typedef GQuark PropertyID; template -struct LIBPBD_API PropertyDescriptor { +struct LIBPBD_TEMPLATE_API PropertyDescriptor { PropertyDescriptor () : property_id (0) {} PropertyDescriptor (PropertyID pid) : property_id (pid) {} @@ -47,17 +47,17 @@ struct LIBPBD_API PropertyDescriptor { }; /** A list of IDs of Properties that have changed in some situation or other */ -class LIBPBD_API PropertyChange : public std::set +class LIBPBD_TEMPLATE_API PropertyChange : public std::set { public: - PropertyChange() {} - ~PropertyChange() {} + LIBPBD_TEMPLATE_MEMBER_API PropertyChange() {} + LIBPBD_TEMPLATE_MEMBER_API ~PropertyChange() {} template PropertyChange(PropertyDescriptor p); - PropertyChange(const PropertyChange& other) : std::set (other) {} + LIBPBD_TEMPLATE_MEMBER_API PropertyChange(const PropertyChange& other) : std::set (other) {} - PropertyChange operator=(const PropertyChange& other) { + LIBPBD_TEMPLATE_MEMBER_API PropertyChange operator=(const PropertyChange& other) { clear (); insert (other.begin (), other.end ()); return *this; @@ -66,7 +66,7 @@ public: template PropertyChange operator=(PropertyDescriptor p); template bool contains (PropertyDescriptor p) const; - bool contains (const PropertyChange& other) const { + LIBPBD_TEMPLATE_MEMBER_API bool contains (const PropertyChange& other) const { for (const_iterator x = other.begin (); x != other.end (); ++x) { if (find (*x) != end ()) { return true; diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index f6ff347ec3..2ccd9bf0ee 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -38,13 +38,13 @@ namespace PBD { * The Searchpath class does not test whether the paths exist * or are directories. It is basically just a container. */ -class LIBPBD_API Searchpath : public std::vector +class LIBPBD_TEMPLATE_API Searchpath : public std::vector { public: /** * Create an empty Searchpath. */ - Searchpath (); + LIBPBD_TEMPLATE_MEMBER_API Searchpath (); /** * Initialize Searchpath from a string where the string contains @@ -57,7 +57,7 @@ public: * * @param search_path A path string. */ - Searchpath (const std::string& search_path); + LIBPBD_TEMPLATE_MEMBER_API Searchpath (const std::string& search_path); /** * Initialize Searchpath from a vector of paths that may or may @@ -65,9 +65,9 @@ public: * * @param paths A vector of paths. */ - Searchpath (const std::vector& paths); + LIBPBD_TEMPLATE_MEMBER_API Searchpath (const std::vector& paths); - ~Searchpath () {}; + LIBPBD_TEMPLATE_MEMBER_API ~Searchpath () {}; /** * @return a search path string. @@ -75,39 +75,39 @@ public: * The string that is returned contains the platform specific * path separator. */ - const std::string to_string () const; + LIBPBD_TEMPLATE_MEMBER_API const std::string to_string () const; /** * Add all the directories in path to this. */ - Searchpath& operator+= (const Searchpath& spath); + LIBPBD_TEMPLATE_MEMBER_API Searchpath& operator+= (const Searchpath& spath); /** * Add another directory path to the search path. */ - Searchpath& operator+= (const std::string& directory_path); + LIBPBD_TEMPLATE_MEMBER_API Searchpath& operator+= (const std::string& directory_path); /** * Concatenate another Searchpath onto this. */ - Searchpath& operator+ (const Searchpath& other); + LIBPBD_TEMPLATE_MEMBER_API Searchpath& operator+ (const Searchpath& other); /** * Add another path to the search path. */ - Searchpath& operator+ (const std::string& directory_path); + LIBPBD_TEMPLATE_MEMBER_API Searchpath& operator+ (const std::string& directory_path); /** * Add a sub-directory to each path in the search path. * @param subdir The directory name, it should not contain * any path separating tokens. */ - Searchpath& add_subdirectory_to_paths (const std::string& subdir); + LIBPBD_TEMPLATE_MEMBER_API Searchpath& add_subdirectory_to_paths (const std::string& subdir); protected: - void add_directory (const std::string& directory_path); - void add_directories (const std::vector& paths); + LIBPBD_TEMPLATE_MEMBER_API void add_directory (const std::string& directory_path); + LIBPBD_TEMPLATE_MEMBER_API void add_directories (const std::vector& paths); }; void export_search_path (const std::string& base_dir, const char* varname, const char* dir);