'libs/pbd' - DLL visibility stuff and associated changes needed for building with MSVC. Currently includes debugging information and things that are just commented out until we have known compatibility with the other platforms (i.e. contains stuff to be removed at a later date)

This commit is contained in:
John Emmas 2013-12-01 14:26:08 +00:00
parent b855e5f322
commit 6bd36896e7
36 changed files with 166 additions and 153 deletions

View file

@ -146,4 +146,4 @@ EnvironmentalProtectionAgency::clear () const
string before = estring.substr (0, equal); string before = estring.substr (0, equal);
g_unsetenv(before.c_str()); g_unsetenv(before.c_str());
} }
} }

View file

@ -521,7 +521,7 @@ gchar *pUsrHome = 0;
// relevant index. // relevant index.
// On Failure: NULL // On Failure: NULL
// //
PBD_API G_CONST_RETURN gchar* PBD_APICALLTYPE LIBPBD_API G_CONST_RETURN gchar* PBD_APICALLTYPE
get_platform_fallback_folder (PBD::fallback_folder_t index) get_platform_fallback_folder (PBD::fallback_folder_t index)
{ {
if ((index >= 0) && (index < FALLBACK_FOLDER_MAX)) if ((index >= 0) && (index < FALLBACK_FOLDER_MAX))
@ -546,7 +546,7 @@ get_platform_fallback_folder (PBD::fallback_folder_t index)
// //
// The value obtained from 'get_platform_fallback_folders()' // The value obtained from 'get_platform_fallback_folders()'
// //
PBD_API G_CONST_RETURN gchar* G_CONST_RETURN * PBD_APICALLTYPE LIBPBD_API G_CONST_RETURN gchar* G_CONST_RETURN * PBD_APICALLTYPE
alloc_platform_fallback_folders () alloc_platform_fallback_folders ()
{ {
return ((G_CONST_RETURN gchar* G_CONST_RETURN *)get_platform_fallback_folders ()); return ((G_CONST_RETURN gchar* G_CONST_RETURN *)get_platform_fallback_folders ());
@ -564,7 +564,7 @@ alloc_platform_fallback_folders ()
// //
// NONE. // NONE.
// //
PBD_API void PBD_APICALLTYPE LIBPBD_API void PBD_APICALLTYPE
free_platform_fallback_folders () free_platform_fallback_folders ()
{ {
int index = FOLDER_LOCALE; int index = FOLDER_LOCALE;

View file

@ -49,7 +49,7 @@ struct timezone
int tz_dsttime; /* type of dst correction */ int tz_dsttime; /* type of dst correction */
}; };
PBD_API int PBD_APICALLTYPE LIBPBD_API int PBD_APICALLTYPE
gettimeofday(struct timeval *__restrict tv, __timezone_ptr_t tz) // Does this need to be exported ? gettimeofday(struct timeval *__restrict tv, __timezone_ptr_t tz) // Does this need to be exported ?
{ {
FILETIME ft; FILETIME ft;
@ -94,22 +94,22 @@ static int tzflag = 0;
#ifndef PTHREAD_H // Defined by PTW32 (Linux and other versions define _PTHREAD_H) #ifndef PTHREAD_H // Defined by PTW32 (Linux and other versions define _PTHREAD_H)
#error "An incompatible version of 'pthread.h' is #included. Use only the Windows (ptw32) version!" #error "An incompatible version of 'pthread.h' is #included. Use only the Windows (ptw32) version!"
#else #else
bool operator> (const pthread_t& lhs, const pthread_t& rhs) LIBPBD_API bool operator> (const pthread_t& lhs, const pthread_t& rhs)
{ {
return (std::greater<void*>()(lhs.p, rhs.p)); return (std::greater<void*>()(lhs.p, rhs.p));
} }
bool operator< (const pthread_t& lhs, const pthread_t& rhs) LIBPBD_API bool operator< (const pthread_t& lhs, const pthread_t& rhs)
{ {
return (std::less<void*>()(lhs.p, rhs.p)); return (std::less<void*>()(lhs.p, rhs.p));
} }
bool operator!= (const pthread_t& lhs, const pthread_t& rhs) LIBPBD_API bool operator!= (const pthread_t& lhs, const pthread_t& rhs)
{ {
return (std::not_equal_to<void*>()(lhs.p, rhs.p)); return (std::not_equal_to<void*>()(lhs.p, rhs.p));
} }
bool operator== (const pthread_t& lhs, const pthread_t& rhs) LIBPBD_API bool operator== (const pthread_t& lhs, const pthread_t& rhs)
{ {
return (!(lhs != rhs)); return (!(lhs != rhs));
} }
@ -166,7 +166,7 @@ char invert_forwardslash(char character)
// On Success: The number of bytes read from the file // On Success: The number of bytes read from the file
// On Failure: -1 // On Failure: -1
// //
PBD_API ssize_t PBD_APICALLTYPE LIBPBD_API ssize_t PBD_APICALLTYPE
pread(int handle, void *buf, size_t nbytes, off_t offset) pread(int handle, void *buf, size_t nbytes, off_t offset)
{ {
int old_errno; int old_errno;
@ -201,7 +201,7 @@ ssize_t ret;
// On Success: The number of bytes written to the file // On Success: The number of bytes written to the file
// On Failure: -1 // On Failure: -1
// //
PBD_API ssize_t PBD_APICALLTYPE LIBPBD_API ssize_t PBD_APICALLTYPE
pwrite(int handle, const void *buf, size_t nbytes, off_t offset) pwrite(int handle, const void *buf, size_t nbytes, off_t offset)
{ {
int old_errno; int old_errno;
@ -235,7 +235,7 @@ ssize_t ret;
// equal to 'x'. // equal to 'x'.
// On Failure: None // On Failure: None
// //
PBD_API double PBD_APICALLTYPE LIBPBD_API double PBD_APICALLTYPE
round(double x) round(double x)
{ {
return (floor(x)); return (floor(x));
@ -255,7 +255,7 @@ namespace PBD {
// On Success: TRUE (if the user's OS matches the minimum spec) // On Success: TRUE (if the user's OS matches the minimum spec)
// On Failure: FALSE otherwise // On Failure: FALSE otherwise
// //
PBD_API bool PBD_APICALLTYPE LIBPBD_API bool PBD_APICALLTYPE
TestForMinimumSpecOS(char *revision /* currently ignored */) TestForMinimumSpecOS(char *revision /* currently ignored */)
{ {
bool bRet = true; bool bRet = true;
@ -289,7 +289,7 @@ bool bRet = true;
// On Success: A pointer to the resolved (absolute) path // On Success: A pointer to the resolved (absolute) path
// On Failure: NULL // On Failure: NULL
// //
PBD_API char* PBD_APICALLTYPE LIBPBD_API char* PBD_APICALLTYPE
realpath (const char *original_path, char resolved_path[_MAX_PATH+1]) realpath (const char *original_path, char resolved_path[_MAX_PATH+1])
{ {
char *pRet = NULL; char *pRet = NULL;
@ -332,7 +332,7 @@ bool bIsSymLink = 0; // We'll probably need to test the incoming path
// On Success: Pointer to a (heap based) DIR structure // On Success: Pointer to a (heap based) DIR structure
// On Failure: NULL // On Failure: NULL
// //
PBD_API DIR* PBD_APICALLTYPE LIBPBD_API DIR* PBD_APICALLTYPE
opendir (const char *szPath) opendir (const char *szPath)
{ {
wchar_t wpath[PATH_MAX+1]; wchar_t wpath[PATH_MAX+1];
@ -424,7 +424,7 @@ DIR *pDir = 0;
// On Success: A pointer to the supplied DIR's 'dirent' struct // On Success: A pointer to the supplied DIR's 'dirent' struct
// On Failure: NULL // On Failure: NULL
// //
PBD_API struct dirent* PBD_APICALLTYPE LIBPBD_API struct dirent* PBD_APICALLTYPE
readdir (DIR* pDir) readdir (DIR* pDir)
{ {
int old_errno = 0; int old_errno = 0;
@ -502,7 +502,7 @@ errno = 0;
// On Success: 0 // On Success: 0
// On Failure: -1 // On Failure: -1
// //
PBD_API int PBD_APICALLTYPE LIBPBD_API int PBD_APICALLTYPE
closedir (DIR *pDir) closedir (DIR *pDir)
{ {
int rc = 0; int rc = 0;
@ -536,7 +536,7 @@ int rc = 0;
// On Success: A file descriptor for the opened file. // On Success: A file descriptor for the opened file.
// On Failure: (-1) // On Failure: (-1)
// //
PBD_API int PBD_APICALLTYPE LIBPBD_API int PBD_APICALLTYPE
mkstemp (char *template_name) mkstemp (char *template_name)
{ {
int ret = (-1); int ret = (-1);
@ -567,7 +567,7 @@ char szTempPath[PATH_MAX+100]; // Just ensure we have plenty of buffer space
// On Success: Non-zero. // On Success: Non-zero.
// On Failure: Zero (call 'GetLastError()' to retrieve info) // On Failure: Zero (call 'GetLastError()' to retrieve info)
// //
PBD_API int PBD_APICALLTYPE LIBPBD_API int PBD_APICALLTYPE
ntfs_link (const char *existing_filepath, const char *link_filepath) ntfs_link (const char *existing_filepath, const char *link_filepath)
{ {
int ret = 1; // 'ERROR_INVALID_FUNCTION' int ret = 1; // 'ERROR_INVALID_FUNCTION'
@ -697,7 +697,7 @@ bool bValidPath = false;
// On Success: Non-zero. // On Success: Non-zero.
// On Failure: Zero (call 'GetLastError()' to retrieve info) // On Failure: Zero (call 'GetLastError()' to retrieve info)
// //
PBD_API int PBD_APICALLTYPE LIBPBD_API int PBD_APICALLTYPE
ntfs_unlink (const char *link_filepath) ntfs_unlink (const char *link_filepath)
{ {
int ret = 1; // 'ERROR_INVALID_FUNCTION' int ret = 1; // 'ERROR_INVALID_FUNCTION'
@ -820,7 +820,7 @@ bool bValidPath = false;
// On Success: A handle to the opened DLL // On Success: A handle to the opened DLL
// On Failure: NULL // On Failure: NULL
// //
PBD_API void* PBD_APICALLTYPE LIBPBD_API void* PBD_APICALLTYPE
dlopen (const char *file_name, int mode) dlopen (const char *file_name, int mode)
{ {
// Note that 'mode' is ignored in Win32 // Note that 'mode' is ignored in Win32
@ -839,7 +839,7 @@ dlopen (const char *file_name, int mode)
// On Success: A non-zero number // On Success: A non-zero number
// On Failure: 0 // On Failure: 0
// //
PBD_API int PBD_APICALLTYPE LIBPBD_API int PBD_APICALLTYPE
dlclose (void *handle) dlclose (void *handle)
{ {
return (::FreeLibrary((HMODULE)handle)); return (::FreeLibrary((HMODULE)handle));
@ -857,7 +857,7 @@ dlclose (void *handle)
// On Success: A pointer to the found function or symbol // On Success: A pointer to the found function or symbol
// On Failure: NULL // On Failure: NULL
// //
PBD_API void* PBD_APICALLTYPE LIBPBD_API void* PBD_APICALLTYPE
dlsym (void *handle, const char *symbol_name) dlsym (void *handle, const char *symbol_name)
{ {
// First test for RTLD_DEFAULT and RTLD_NEXT // First test for RTLD_DEFAULT and RTLD_NEXT
@ -883,7 +883,7 @@ static char szLastWinError[LOCAL_ERROR_BUF_SIZE];
// last error // last error
// On Failure: NULL (if the last error was ERROR_SUCCESS) // On Failure: NULL (if the last error was ERROR_SUCCESS)
// //
PBD_API char* PBD_APICALLTYPE LIBPBD_API char* PBD_APICALLTYPE
dlerror () dlerror ()
{ {
DWORD dwLastErrorId = GetLastError(); DWORD dwLastErrorId = GetLastError();

View file

@ -172,7 +172,7 @@ int ret = 0; // This functionality is not yet implemented
// writing or had data available for reading. // writing or had data available for reading.
// On Failure: -1 (the actual error is saved in 'errno'). // On Failure: -1 (the actual error is saved in 'errno').
// //
PBD_API int PBD_APICALLTYPE LIBPBD_API int PBD_APICALLTYPE
poll (struct pollfd *fds, nfds_t nfds, int timeout) poll (struct pollfd *fds, nfds_t nfds, int timeout)
{ {
int elapsed_time = 0; int elapsed_time = 0;

View file

@ -34,7 +34,7 @@
// if the type of object being contained has no appropriate comparison operators // if the type of object being contained has no appropriate comparison operators
// defined (specifically, if operators '<' and '==' are undefined). This seems // defined (specifically, if operators '<' and '==' are undefined). This seems
// to be the case with ptw32 'pthread_t' which is a simple struct. // to be the case with ptw32 'pthread_t' which is a simple struct.
DECLARE_DEFAULT_COMPARISONS(pthread_t) DECLARE_DEFAULT_COMPARISONS(ptw32_handle_t)
#endif #endif
using namespace std; using namespace std;

View file

@ -52,7 +52,7 @@
class Touchable; class Touchable;
template<typename RequestObject> template<typename RequestObject>
class ABSTRACT_UI_API AbstractUI : public BaseUI /* see notes in visibility.h about why this is not LIBPBD_API */ class /*ABSTRACT_UI_API*/ AbstractUI : public BaseUI /* see notes in visibility.h about why this is not LIBPBD_API */
{ {
public: public:
AbstractUI (const std::string& name); AbstractUI (const std::string& name);

View file

@ -97,7 +97,7 @@ struct LIBPBD_API AngularVector {
} }
}; };
LIBPBD_API inline void CartesianVector::angular (AngularVector& a) const { inline void CartesianVector::angular (AngularVector& a) const {
cartesian_to_spherical (x, y, z, a.azi, a.ele, a.length); cartesian_to_spherical (x, y, z, a.azi, a.ele, a.length);
} }

View file

@ -204,7 +204,7 @@ namespace StringPrivate
// a series of functions which accept a format string on the form "text %1 // 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 // more %2 less %3" and a number of templated parameters and spits out the
// composited string // composited string
template <typename T1> LIBPBD_API template <typename T1>
inline std::string string_compose(const std::string &fmt, const T1 &o1) inline std::string string_compose(const std::string &fmt, const T1 &o1)
{ {
StringPrivate::Composition c(fmt); StringPrivate::Composition c(fmt);
@ -212,7 +212,7 @@ namespace StringPrivate
return c.str(); return c.str();
} }
template <typename T1, typename T2> LIBPBD_API template <typename T1, typename T2>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2) const T1 &o1, const T2 &o2)
{ {
@ -221,7 +221,7 @@ namespace StringPrivate
return c.str(); return c.str();
} }
template <typename T1, typename T2, typename T3> LIBPBD_API template <typename T1, typename T2, typename T3>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3) const T1 &o1, const T2 &o2, const T3 &o3)
{ {
@ -230,7 +230,7 @@ namespace StringPrivate
return c.str(); return c.str();
} }
template <typename T1, typename T2, typename T3, typename T4> LIBPBD_API template <typename T1, typename T2, typename T3, typename T4>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4) const T4 &o4)
@ -240,7 +240,7 @@ namespace StringPrivate
return c.str(); return c.str();
} }
template <typename T1, typename T2, typename T3, typename T4, typename T5> LIBPBD_API template <typename T1, typename T2, typename T3, typename T4, typename T5>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5) const T4 &o4, const T5 &o5)
@ -251,7 +251,7 @@ namespace StringPrivate
} }
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6> LIBPBD_API typename T6>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6) const T4 &o4, const T5 &o5, const T6 &o6)
@ -262,7 +262,7 @@ namespace StringPrivate
} }
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7> LIBPBD_API typename T6, typename T7>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,
@ -274,7 +274,7 @@ namespace StringPrivate
} }
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8> LIBPBD_API typename T6, typename T7, typename T8>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,
@ -286,7 +286,7 @@ namespace StringPrivate
} }
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9> LIBPBD_API typename T6, typename T7, typename T8, typename T9>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,
@ -298,7 +298,7 @@ namespace StringPrivate
} }
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10> LIBPBD_API typename T6, typename T7, typename T8, typename T9, typename T10>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,
@ -313,7 +313,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10, typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11> LIBPBD_API typename T11>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,
@ -328,7 +328,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10, typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12> LIBPBD_API typename T11, typename T12>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,
@ -343,7 +343,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10, typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12, typename T13> LIBPBD_API typename T11, typename T12, typename T13>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,
@ -359,7 +359,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10, typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12, typename T13, typename T14> LIBPBD_API typename T11, typename T12, typename T13, typename T14>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,
@ -376,7 +376,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5, template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10, typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12, typename T13, typename T14, typename T11, typename T12, typename T13, typename T14,
typename T15> LIBPBD_API typename T15>
inline std::string string_compose(const std::string &fmt, inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3, const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6, const T4 &o4, const T5 &o5, const T6 &o6,

View file

@ -47,7 +47,7 @@ LIBPBD_API std::string length2string (const int64_t frames, const double sample_
LIBPBD_API std::vector<std::string> internationalize (const char *, const char **); LIBPBD_API std::vector<std::string> internationalize (const char *, const char **);
LIBPBD_API bool strings_equal_ignore_case (const std::string& a, const std::string& b); LIBPBD_API bool strings_equal_ignore_case (const std::string& a, const std::string& b);
template <class T> std::string LIBPBD_API template <class T> std::string /*LIBPBD_API*/
to_string (T t, std::ios_base & (*f)(std::ios_base&)) to_string (T t, std::ios_base & (*f)(std::ios_base&))
{ {
std::ostringstream oss; std::ostringstream oss;

View file

@ -32,7 +32,7 @@
namespace PBD namespace PBD
{ {
template<typename T> LIBPBD_API template<typename T> /*LIBPBD_API*/
std::string demangled_name (T const & obj) std::string demangled_name (T const & obj)
{ {
#ifdef __GNUC__ #ifdef __GNUC__

View file

@ -23,7 +23,7 @@
#include <glib/gtypes.h> #include <glib/gtypes.h>
#ifdef PLATFORM_WINDOWS // Would not be relevant for Cygwin!! #ifdef PLATFORM_WINDOWS // Would not be relevant for Cygwin!!
PBD_API gchar* PBD_APICALLTYPE get_win_special_folder (int csidl); LIBPBD_API gchar* PBD_APICALLTYPE get_win_special_folder (int csidl);
#endif #endif
namespace PBD { namespace PBD {
@ -49,9 +49,9 @@ namespace PBD {
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
PBD_API G_CONST_RETURN gchar* PBD_APICALLTYPE get_platform_fallback_folder (PBD::fallback_folder_t index); LIBPBD_API G_CONST_RETURN gchar* PBD_APICALLTYPE get_platform_fallback_folder (PBD::fallback_folder_t index);
PBD_API G_CONST_RETURN gchar* G_CONST_RETURN * PBD_APICALLTYPE alloc_platform_fallback_folders (); LIBPBD_API G_CONST_RETURN gchar* G_CONST_RETURN * PBD_APICALLTYPE alloc_platform_fallback_folders ();
PBD_API void PBD_APICALLTYPE free_platform_fallback_folders (); LIBPBD_API void PBD_APICALLTYPE free_platform_fallback_folders ();
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */

View file

@ -20,8 +20,10 @@
#ifndef __libpbd_ffs_h__ #ifndef __libpbd_ffs_h__
#define __libpbd_ffs_h__ #define __libpbd_ffs_h__
#include "pbd/libpbd_visibility.h"
namespace PBD { namespace PBD {
int ffs(int x); LIBPBD_API int ffs(int x);
} }
#endif /* __libpbd_ffs_h__ */ #endif /* __libpbd_ffs_h__ */

View file

@ -34,7 +34,7 @@
namespace PBD { namespace PBD {
union LIBPBD_API Float_t union /*LIBPBD_API*/ Float_t
{ {
Float_t (float num = 0.0f) : f(num) {} Float_t (float num = 0.0f) : f(num) {}

View file

@ -37,7 +37,7 @@
namespace PBD { namespace PBD {
template <class obj_type, class arg_type> template <class obj_type, class arg_type>
class LIBPBD_API FunctorCommand : public Command class /*LIBPBD_API*/ FunctorCommand : public Command
{ {
private: private:
typedef void (obj_type::*functor_type)(arg_type); typedef void (obj_type::*functor_type)(arg_type);

View file

@ -22,11 +22,12 @@
#include <glibmm/threads.h> #include <glibmm/threads.h>
#include "pbd/libpbd_visibility.h"
#include "atomic_counter.h" #include "atomic_counter.h"
namespace PBD { namespace PBD {
class GlibSemaphore class LIBPBD_API GlibSemaphore
{ {
// prevent copying and assignment // prevent copying and assignment

View file

@ -24,7 +24,7 @@
namespace PBD { namespace PBD {
struct LocaleGuard { struct LIBPBD_API /* Added by JE - */ LocaleGuard {
LocaleGuard (const char*); LocaleGuard (const char*);
~LocaleGuard (); ~LocaleGuard ();
const char* old; const char* old;

View file

@ -51,7 +51,7 @@
* can do `just-in-time' binding from the crossfade ID. * can do `just-in-time' binding from the crossfade ID.
*/ */
template <class obj_T> template <class obj_T>
class LIBPBD_API MementoCommandBinder : public PBD::Destructible class /*LIBPBD_API*/ MementoCommandBinder : public PBD::Destructible
{ {
public: public:
/** @return Stateful object to operate on */ /** @return Stateful object to operate on */
@ -68,7 +68,7 @@ public:
/** A simple MementoCommandBinder which binds directly to an object */ /** A simple MementoCommandBinder which binds directly to an object */
template <class obj_T> template <class obj_T>
class LIBPBD_API SimpleMementoCommandBinder : public MementoCommandBinder<obj_T> class /*LIBPBD_API*/ SimpleMementoCommandBinder : public MementoCommandBinder<obj_T>
{ {
public: public:
SimpleMementoCommandBinder (obj_T& o) SimpleMementoCommandBinder (obj_T& o)
@ -100,7 +100,7 @@ private:
* memento, and redo is restoring the after memento. * memento, and redo is restoring the after memento.
*/ */
template <class obj_T> template <class obj_T>
class LIBPBD_API MementoCommand : public Command class /*LIBPBD_API*/ MementoCommand : public Command
{ {
public: public:
MementoCommand (obj_T& a_object, XMLNode* a_before, XMLNode* a_after) MementoCommand (obj_T& a_object, XMLNode* a_before, XMLNode* a_after)

View file

@ -20,9 +20,12 @@
#define _msvc_pbd_h_ #define _msvc_pbd_h_
#ifdef PBD_IS_IN_WIN_STATIC_LIB // #define if your project uses libpbd (under Windows) as a static library #ifdef PBD_IS_IN_WIN_STATIC_LIB // #define if your project uses libpbd (under Windows) as a static library
#undef LIBPBD_DLL
#define PBD_IS_IN_WINDLL 0 #define PBD_IS_IN_WINDLL 0
#endif #endif
#include <pbd/libpbd_visibility.h>
#ifndef COMPILER_MSVC #ifndef COMPILER_MSVC
#include <sys/time.h> #include <sys/time.h>
#else #else
@ -39,23 +42,22 @@
#endif #endif
#endif #endif
#if PBD_IS_IN_WINDLL && !defined(PBD_API) #if PBD_IS_IN_WINDLL && !defined(PBD_APICALLTYPE)
#if defined(BUILDING_PBD) #if defined(BUILDING_PBD)
#define PBD_API __declspec(dllexport) #define PBD_APICALLTYPE __cdecl
#define PBD_APICALLTYPE __stdcall
#elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point
#define PBD_API __declspec(dllimport) #define PBD_APICALLTYPE __cdecl
#define PBD_APICALLTYPE __stdcall
#else #else
#error "Attempting to define __declspec with an incompatible compiler !" #error "Attempting to define __declspec with an incompatible compiler !"
#endif #endif
#elif !defined(PBD_API) #elif !defined(PBD_APICALLTYPE)
// Other compilers / platforms could be accommodated here // Other compilers / platforms could be accommodated here
#define PBD_API
#define PBD_APICALLTYPE #define PBD_APICALLTYPE
#ifndef GETOPT_API
#define GETOPT_API #define GETOPT_API
#define GETOPT_APICALLTYPE #define GETOPT_APICALLTYPE
#endif #endif
#endif
#ifndef GETOPT_API #ifndef GETOPT_API
#if defined(BUILDING_GETOPT) #if defined(BUILDING_GETOPT)
@ -145,23 +147,27 @@ extern "C" {
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
PBDEXTN_API int PBDEXTN_APICALLTYPE cyginit (unsigned int result); PBDEXTN_API int PBDEXTN_APICALLTYPE cyginit (unsigned int result);
PBD_API int PBD_APICALLTYPE dlclose (void *handle) __THROW; LIBPBD_API int PBD_APICALLTYPE dlclose (void *handle) __THROW;
PBD_API void* PBD_APICALLTYPE dlopen (const char *file_name, int mode) __THROW; LIBPBD_API void* PBD_APICALLTYPE dlopen (const char *file_name, int mode) __THROW;
PBD_API void* PBD_APICALLTYPE dlsym (void *handle, const char *symbol_name) __THROW; LIBPBD_API void* PBD_APICALLTYPE dlsym (void *handle, const char *symbol_name) __THROW;
PBD_API char* PBD_APICALLTYPE dlerror () __THROW; LIBPBD_API char* PBD_APICALLTYPE dlerror () __THROW;
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif /* __cplusplus */ #endif /* __cplusplus */
#ifndef __CYGWIN__ #ifndef __CYGWIN__
/* For whatever reason, Ardour's 'libevoral' refuses to build as a DLL if we include both 'rpc.h' */
/* and 'WinSock2.h'. It doesn't seem to matter which order we #include them. Given that we can't */
/* edit 'rpc.h' or 'WinSock2.h', just make sure we don't #include them when building libevoral. */
#ifndef BUILDING_EVORAL
#include <rpc.h> #include <rpc.h>
typedef int (FAR PBDEXTN_APICALLTYPE *CYGINIT_API)(unsigned int);
#endif
#include <io.h> #include <io.h>
#include <sys/types.h> #include <sys/types.h>
typedef int (FAR PBDEXTN_APICALLTYPE *CYGINIT_API)(unsigned int);
#ifndef FILENAME_MAX #ifndef FILENAME_MAX
#define FILENAME_MAX (260) #define FILENAME_MAX (260)
#endif #endif
@ -216,35 +222,35 @@ struct pollfd
typedef unsigned int nfds_t; typedef unsigned int nfds_t;
PBD_API int PBD_APICALLTYPE gettimeofday(struct timeval *__restrict tv, __timezone_ptr_t tz);
PBD_API ssize_t PBD_APICALLTYPE pread(int handle, void *buf, size_t nbytes, off_t offset);
PBD_API ssize_t PBD_APICALLTYPE pwrite(int handle, const void *buf, size_t nbytes, off_t offset);
PBD_API int PBD_APICALLTYPE poll(struct pollfd *fds, nfds_t nfds, int timeout);
PBD_API double PBD_APICALLTYPE round(double x);
namespace PBD {
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
PBD_API bool PBD_APICALLTYPE TestForMinimumSpecOS(char *revision="currently ignored"); LIBPBD_API int __cdecl gettimeofday(struct timeval *__restrict tv, __timezone_ptr_t tz);
PBD_API char* PBD_APICALLTYPE realpath (const char *original_path, char resolved_path[_MAX_PATH+1]); LIBPBD_API ssize_t PBD_APICALLTYPE pread(int handle, void *buf, size_t nbytes, off_t offset);
PBD_API int PBD_APICALLTYPE mkstemp (char *template_name); LIBPBD_API ssize_t PBD_APICALLTYPE pwrite(int handle, const void *buf, size_t nbytes, off_t offset);
PBD_API int PBD_APICALLTYPE ntfs_link (const char *existing_filepath, const char *link_filepath); LIBPBD_API int PBD_APICALLTYPE poll(struct pollfd *fds, nfds_t nfds, int timeout);
PBD_API int PBD_APICALLTYPE ntfs_unlink (const char *link_filepath); LIBPBD_API double PBD_APICALLTYPE round(double x);
namespace PBD {
LIBPBD_API bool PBD_APICALLTYPE TestForMinimumSpecOS(char *revision="currently ignored");
LIBPBD_API char* PBD_APICALLTYPE realpath (const char *original_path, char resolved_path[_MAX_PATH+1]);
LIBPBD_API int PBD_APICALLTYPE mkstemp (char *template_name);
LIBPBD_API int PBD_APICALLTYPE ntfs_link (const char *existing_filepath, const char *link_filepath);
LIBPBD_API int PBD_APICALLTYPE ntfs_unlink (const char *link_filepath);
// These are used to replicate 'dirent.h' functionality // These are used to replicate 'dirent.h' functionality
PBD_API DIR* PBD_APICALLTYPE opendir (const char *szPath); LIBPBD_API DIR* PBD_APICALLTYPE opendir (const char *szPath);
PBD_API struct dirent* PBD_APICALLTYPE readdir (DIR *pDir); LIBPBD_API struct dirent* PBD_APICALLTYPE readdir (DIR *pDir);
PBD_API int PBD_APICALLTYPE closedir (DIR *pDir); LIBPBD_API int PBD_APICALLTYPE closedir (DIR *pDir);
} // namespace PBD
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif /* __cplusplus */ #endif /* __cplusplus */
} // namespace PBD
#endif // !__CYGWIN__ #endif // !__CYGWIN__
#endif // PLATFORM_WINDOWS #endif // PLATFORM_WINDOWS
#endif // _msvc_pbd_h_ #endif // _msvc_pbd_h_

View file

@ -24,6 +24,7 @@
#include "pbd/libpbd_visibility.h" #include "pbd/libpbd_visibility.h"
namespace PBD { namespace PBD {
LIBPBD_API std::string canonical_path (const std::string& path);
LIBPBD_API std::string path_expand (std::string path); LIBPBD_API std::string path_expand (std::string path);
LIBPBD_API std::string search_path_expand (std::string path); LIBPBD_API std::string search_path_expand (std::string path);
} }

View file

@ -37,7 +37,7 @@ namespace PBD {
/** Parent class for classes which represent a single scalar property in a Stateful object */ /** Parent class for classes which represent a single scalar property in a Stateful object */
template<class T> template<class T>
class LIBPBD_API PropertyTemplate : public PropertyBase class /*LIBPBD_API*/ PropertyTemplate : public PropertyBase
{ {
public: public:
PropertyTemplate (PropertyDescriptor<T> p, T const& v) PropertyTemplate (PropertyDescriptor<T> p, T const& v)
@ -197,7 +197,7 @@ private:
PropertyTemplate (PropertyTemplate<T> const &); PropertyTemplate (PropertyTemplate<T> const &);
}; };
template<class T> LIBPBD_API template<class T> /*LIBPBD_API*/
std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s) std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s)
{ {
return os << s.val (); return os << s.val ();
@ -207,7 +207,7 @@ std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s)
* with types that can be written to / read from stringstreams. * with types that can be written to / read from stringstreams.
*/ */
template<class T> template<class T>
class LIBPBD_API Property : public PropertyTemplate<T> class /*LIBPBD_API*/ Property : public PropertyTemplate<T>
{ {
public: public:
Property (PropertyDescriptor<T> q, T const& v) Property (PropertyDescriptor<T> q, T const& v)
@ -285,7 +285,7 @@ private:
* separators, etc. * separators, etc.
*/ */
template<> template<>
class LIBPBD_API Property<std::string> : public PropertyTemplate<std::string> class /*LIBPBD_API*/ Property<std::string> : public PropertyTemplate<std::string>
{ {
public: public:
Property (PropertyDescriptor<std::string> d, std::string const & v) Property (PropertyDescriptor<std::string> d, std::string const & v)
@ -319,7 +319,7 @@ private:
}; };
template<class T> template<class T>
class LIBPBD_API EnumProperty : public Property<T> class /*LIBPBD_API*/ EnumProperty : public Property<T>
{ {
public: public:
EnumProperty (PropertyDescriptor<T> q, T const& v) EnumProperty (PropertyDescriptor<T> q, T const& v)
@ -352,7 +352,7 @@ private:
* one. * one.
*/ */
template <class T> template <class T>
class LIBPBD_API SharedStatefulProperty : public PropertyBase class /*LIBPBD_API*/ SharedStatefulProperty : public PropertyBase
{ {
public: public:
typedef boost::shared_ptr<T> Ptr; typedef boost::shared_ptr<T> Ptr;

View file

@ -38,7 +38,7 @@ class LIBPBD_API StatefulDiffCommand;
typedef GQuark PropertyID; typedef GQuark PropertyID;
template<typename T> template<typename T>
struct LIBPBD_API PropertyDescriptor { struct /*LIBPBD_API*/ PropertyDescriptor {
PropertyDescriptor () : property_id (0) {} PropertyDescriptor () : property_id (0) {}
PropertyDescriptor (PropertyID pid) : property_id (pid) {} PropertyDescriptor (PropertyID pid) : property_id (pid) {}
@ -47,16 +47,17 @@ struct LIBPBD_API PropertyDescriptor {
}; };
/** A list of IDs of Properties that have changed in some situation or other */ /** A list of IDs of Properties that have changed in some situation or other */
class LIBPBD_API PropertyChange : public std::set<PropertyID> class /*LIBPBD_API*/ PropertyChange : public std::set<PropertyID>
{ {
public: public:
PropertyChange() {} LIBPBD_API PropertyChange() {}
LIBPBD_API ~PropertyChange() {}
template<typename T> PropertyChange(PropertyDescriptor<T> p); template<typename T> PropertyChange(PropertyDescriptor<T> p);
PropertyChange(const PropertyChange& other) : std::set<PropertyID> (other) {} LIBPBD_API PropertyChange(const PropertyChange& other) : std::set<PropertyID> (other) {}
PropertyChange operator=(const PropertyChange& other) { LIBPBD_API PropertyChange operator=(const PropertyChange& other) {
clear (); clear ();
insert (other.begin (), other.end ()); insert (other.begin (), other.end ());
return *this; return *this;
@ -65,7 +66,7 @@ public:
template<typename T> PropertyChange operator=(PropertyDescriptor<T> p); template<typename T> PropertyChange operator=(PropertyDescriptor<T> p);
template<typename T> bool contains (PropertyDescriptor<T> p) const; template<typename T> bool contains (PropertyDescriptor<T> p) const;
bool contains (const PropertyChange& other) const { LIBPBD_API bool contains (const PropertyChange& other) const {
for (const_iterator x = other.begin (); x != other.end (); ++x) { for (const_iterator x = other.begin (); x != other.end (); ++x) {
if (find (*x) != end ()) { if (find (*x) != end ()) {
return true; return true;
@ -74,8 +75,8 @@ public:
return false; return false;
} }
void add (PropertyID id) { insert (id); } LIBPBD_API void add (PropertyID id) { insert (id); }
void add (const PropertyChange& other) { insert (other.begin (), other.end ()); } LIBPBD_API void add (const PropertyChange& other) { insert (other.begin (), other.end ()); }
template<typename T> void add (PropertyDescriptor<T> p); template<typename T> void add (PropertyDescriptor<T> p);
}; };

View file

@ -45,7 +45,7 @@
and managed object. and managed object.
*/ */
template<class T> template<class T>
class LIBPBD_API RCUManager class /*LIBPBD_API*/ RCUManager
{ {
public: public:
@ -111,7 +111,7 @@ class LIBPBD_API RCUManager
means that no actual objects will be deleted incorrectly if this is misused. means that no actual objects will be deleted incorrectly if this is misused.
*/ */
template<class T> template<class T>
class LIBPBD_API SerializedRCUManager : public RCUManager<T> class /*LIBPBD_API*/ SerializedRCUManager : public RCUManager<T>
{ {
public: public:
@ -214,7 +214,7 @@ private:
*/ */
template<class T> template<class T>
class LIBPBD_API RCUWriter class /*LIBPBD_API*/ RCUWriter
{ {
public: public:

View file

@ -26,7 +26,7 @@
#include "pbd/libpbd_visibility.h" #include "pbd/libpbd_visibility.h"
template<class T> template<class T>
class LIBPBD_API RingBuffer class /*LIBPBD_API*/ RingBuffer
{ {
public: public:
RingBuffer (guint sz) { RingBuffer (guint sz) {
@ -120,7 +120,7 @@ class LIBPBD_API RingBuffer
guint size_mask; guint size_mask;
}; };
template<class T> LIBPBD_API guint template<class T> /*LIBPBD_API*/ guint
RingBuffer<T>::read (T *dest, guint cnt) RingBuffer<T>::read (T *dest, guint cnt)
{ {
guint free_cnt; guint free_cnt;
@ -159,7 +159,7 @@ RingBuffer<T>::read (T *dest, guint cnt)
return to_read; return to_read;
} }
template<class T> LIBPBD_API guint template<class T> /*LIBPBD_API*/ guint
RingBuffer<T>::write (T const *src, guint cnt) RingBuffer<T>::write (T const *src, guint cnt)
{ {
@ -199,7 +199,7 @@ RingBuffer<T>::write (T const *src, guint cnt)
return to_write; return to_write;
} }
template<class T> LIBPBD_API void template<class T> /*LIBPBD_API*/ void
RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec) RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec)
{ {
@ -240,7 +240,7 @@ RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec)
} }
} }
template<class T> LIBPBD_API void template<class T> /*LIBPBD_API*/ void
RingBuffer<T>::get_write_vector (typename RingBuffer<T>::rw_vector *vec) RingBuffer<T>::get_write_vector (typename RingBuffer<T>::rw_vector *vec)
{ {

View file

@ -32,7 +32,7 @@ namespace PBD {
/* ringbuffer class where the element size is not required to be a power of two */ /* ringbuffer class where the element size is not required to be a power of two */
template<class T> template<class T>
class LIBPBD_API RingBufferNPT class /*LIBPBD_API*/ RingBufferNPT
{ {
public: public:
RingBufferNPT (size_t sz) { RingBufferNPT (size_t sz) {
@ -120,7 +120,7 @@ class LIBPBD_API RingBufferNPT
mutable gint read_ptr; mutable gint read_ptr;
}; };
template<class T> LIBPBD_API size_t template<class T> /*LIBPBD_API*/ size_t
RingBufferNPT<T>::read (T *dest, size_t cnt) RingBufferNPT<T>::read (T *dest, size_t cnt)
{ {
size_t free_cnt; size_t free_cnt;
@ -159,7 +159,7 @@ RingBufferNPT<T>::read (T *dest, size_t cnt)
return to_read; return to_read;
} }
template<class T> LIBPBD_API size_t template<class T> /*LIBPBD_API*/ size_t
RingBufferNPT<T>::write (const T *src, size_t cnt) RingBufferNPT<T>::write (const T *src, size_t cnt)
{ {
size_t free_cnt; size_t free_cnt;
@ -198,7 +198,7 @@ RingBufferNPT<T>::write (const T *src, size_t cnt)
return to_write; return to_write;
} }
template<class T> LIBPBD_API void template<class T> /*LIBPBD_API*/ void
RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec) RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec)
{ {
size_t free_cnt; size_t free_cnt;
@ -238,7 +238,7 @@ RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec)
} }
} }
template<class T> LIBPBD_API void template<class T> /*LIBPBD_API*/ void
RingBufferNPT<T>::get_write_vector (typename RingBufferNPT<T>::rw_vector *vec) RingBufferNPT<T>::get_write_vector (typename RingBufferNPT<T>::rw_vector *vec)
{ {
size_t free_cnt; size_t free_cnt;

View file

@ -38,13 +38,13 @@ namespace PBD {
* The Searchpath class does not test whether the paths exist * The Searchpath class does not test whether the paths exist
* or are directories. It is basically just a container. * or are directories. It is basically just a container.
*/ */
class LIBPBD_API SearchPath : public std::vector<std::string> class /*LIBPBD_API*/ Searchpath : public std::vector<std::string>
{ {
public: public:
/** /**
* Create an empty Searchpath. * Create an empty Searchpath.
*/ */
Searchpath (); LIBPBD_API Searchpath ();
/** /**
* Initialize Searchpath from a string where the string contains * Initialize Searchpath from a string where the string contains
@ -57,7 +57,7 @@ public:
* *
* @param search_path A path string. * @param search_path A path string.
*/ */
Searchpath (const std::string& search_path); LIBPBD_API Searchpath (const std::string& search_path);
/** /**
* Initialize Searchpath from a vector of paths that may or may * Initialize Searchpath from a vector of paths that may or may
@ -65,7 +65,9 @@ public:
* *
* @param paths A vector of paths. * @param paths A vector of paths.
*/ */
Searchpath (const std::vector<std::string>& paths); LIBPBD_API Searchpath (const std::vector<std::string>& paths);
LIBPBD_API ~Searchpath () {};
/** /**
* @return a search path string. * @return a search path string.
@ -73,39 +75,39 @@ public:
* The string that is returned contains the platform specific * The string that is returned contains the platform specific
* path separator. * path separator.
*/ */
const std::string to_string () const; LIBPBD_API const std::string to_string () const;
/** /**
* Add all the directories in path to this. * Add all the directories in path to this.
*/ */
Searchpath& operator+= (const Searchpath& spath); LIBPBD_API Searchpath& operator+= (const Searchpath& spath);
/** /**
* Add another directory path to the search path. * Add another directory path to the search path.
*/ */
Searchpath& operator+= (const std::string& directory_path); LIBPBD_API Searchpath& operator+= (const std::string& directory_path);
/** /**
* Concatenate another Searchpath onto this. * Concatenate another Searchpath onto this.
*/ */
Searchpath& operator+ (const Searchpath& other); LIBPBD_API Searchpath& operator+ (const Searchpath& other);
/** /**
* Add another path to the search path. * Add another path to the search path.
*/ */
Searchpath& operator+ (const std::string& directory_path); LIBPBD_API Searchpath& operator+ (const std::string& directory_path);
/** /**
* Add a sub-directory to each path in the search path. * Add a sub-directory to each path in the search path.
* @param subdir The directory name, it should not contain * @param subdir The directory name, it should not contain
* any path separating tokens. * any path separating tokens.
*/ */
Searchpath& add_subdirectory_to_paths (const std::string& subdir); LIBPBD_API Searchpath& add_subdirectory_to_paths (const std::string& subdir);
protected: protected:
void add_directory (const std::string& directory_path); LIBPBD_API void add_directory (const std::string& directory_path);
void add_directories (const std::vector<std::string>& paths); LIBPBD_API void add_directories (const std::vector<std::string>& paths);
}; };
} // namespace PBD } // namespace PBD

View file

@ -49,7 +49,7 @@ namespace PBD {
only safe way to reliably signal from a real-time audio thread. The only safe way to reliably signal from a real-time audio thread. The
counting semantics also complement ringbuffers of events nicely. counting semantics also complement ringbuffers of events nicely.
*/ */
class LIBPBD_API Semaphore class /*LIBPBD_API*/ Semaphore
{ {
public: public:
/** /**

View file

@ -44,7 +44,7 @@ namespace PBD {
* any change. * any change.
*/ */
template<typename Container> template<typename Container>
class LIBPBD_API SequenceProperty : public PropertyBase class /*LIBPBD_API*/ SequenceProperty : public PropertyBase
{ {
public: public:
typedef std::set<typename Container::value_type> ChangeContainer; typedef std::set<typename Container::value_type> ChangeContainer;
@ -311,10 +311,10 @@ class LIBPBD_API SequenceProperty : public PropertyBase
} }
Container& operator= (const Container& other) { Container& operator= (const Container& other) {
for (typename Container::iterator i = _val.begin(); i != _val.end(); ++i) { for (typename Container::const_iterator i = _val.begin(); i != _val.end(); ++i) {
_changes.remove (*i); _changes.remove (*i);
} }
for (typename Container::iterator i = other.begin(); i != other.end(); ++i) { for (typename Container::const_iterator i = other.begin(); i != other.end(); ++i) {
_changes.add (*i); _changes.add (*i);
} }
return _val = other; return _val = other;

View file

@ -79,7 +79,7 @@ private:
}; };
template<typename R> template<typename R>
class LIBPBD_API OptionalLastValue class /*LIBPBD_API*/ OptionalLastValue
{ {
public: public:
typedef boost::optional<R> result_type; typedef boost::optional<R> result_type;

View file

@ -40,10 +40,10 @@
namespace PBD { namespace PBD {
LIBPBD_API void stacktrace (std::ostream& out, int levels = 0); LIBPBD_API void stacktrace (std::ostream& out, int levels = 0);
LIBPBD_API void trace_twb(); LIBPBD_API void trace_twb();
std::string demangle (const std::string&); /* JE - !!!! Declaration might possibly get removed (except it's still used in 'libs/canvas/item.cc') */ std::string demangle (const std::string&);
template<typename T> template<typename T>
class LIBPBD_API thing_with_backtrace class /*LIBPBD_API*/ thing_with_backtrace
{ {
public: public:
thing_with_backtrace () { thing_with_backtrace () {
@ -112,11 +112,11 @@ private:
static Glib::Threads::Mutex all_mutex; static Glib::Threads::Mutex all_mutex;
}; };
template<typename T> LIBPBD_API std::list<PBD::thing_with_backtrace<T> *> PBD::thing_with_backtrace<T>::all; template<typename T> /*LIBPBD_API*/ std::list<PBD::thing_with_backtrace<T> *> PBD::thing_with_backtrace<T>::all;
template<typename T> LIBPBD_API Glib::Threads::Mutex PBD::thing_with_backtrace<T>::all_mutex; template<typename T> /*LIBPBD_API*/ Glib::Threads::Mutex PBD::thing_with_backtrace<T>::all_mutex;
} // namespace PBD } // namespace PBD
// JE - !!!!#include "../pbd/stacktrace.impl"
#endif /* __libpbd_stacktrace_h__ */ #endif /* __libpbd_stacktrace_h__ */

View file

@ -26,7 +26,7 @@
first include the revelant container type header. first include the revelant container type header.
*/ */
#if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR) || defined(_LIBCPP_VECTOR) #if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR) || defined(_LIBCPP_VECTOR)
template<class T> LIBPBD_API void vector_delete (std::vector<T *> *vec) template<class T> /*LIBPBD_API*/ void vector_delete (std::vector<T *> *vec)
{ {
typename std::vector<T *>::iterator i; typename std::vector<T *>::iterator i;
@ -38,7 +38,7 @@ template<class T> LIBPBD_API void vector_delete (std::vector<T *> *vec)
#endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR || _LIBCPP_VECTOR #endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR || _LIBCPP_VECTOR
#if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP) #if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP)
template<class K, class T> LIBPBD_API void map_delete (std::map<K, T *> *m) template<class K, class T> /*LIBPBD_API*/ void map_delete (std::map<K, T *> *m)
{ {
typename std::map<K, T *>::iterator i; typename std::map<K, T *>::iterator i;
@ -50,7 +50,7 @@ template<class K, class T> LIBPBD_API void map_delete (std::map<K, T *> *m)
#endif // _CPP_MAP || _GLIBCXX_MAP || __SGI_STL_MAP #endif // _CPP_MAP || _GLIBCXX_MAP || __SGI_STL_MAP
#if defined(_CPP_LIST) || defined(_GLIBCXX_LIST) || defined(__SGI_STL_LIST) #if defined(_CPP_LIST) || defined(_GLIBCXX_LIST) || defined(__SGI_STL_LIST)
template<class T> LIBPBD_API void list_delete (std::list<T *> *l) template<class T> /*LIBPBD_API*/ void list_delete (std::list<T *> *l)
{ {
typename std::list<T *>::iterator i; typename std::list<T *>::iterator i;
@ -63,7 +63,7 @@ template<class T> LIBPBD_API void list_delete (std::list<T *> *l)
#endif // _CPP_LIST || _GLIBCXX_LIST || __SGI_STL_LIST #endif // _CPP_LIST || _GLIBCXX_LIST || __SGI_STL_LIST
#if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST) #if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST)
template<class T> LIBPBD_API void slist_delete (std::slist<T *> *l) template<class T> /*LIBPBD_API*/ void slist_delete (std::slist<T *> *l)
{ {
typename std::slist<T *>::iterator i; typename std::slist<T *>::iterator i;
@ -76,7 +76,7 @@ template<class T> LIBPBD_API void slist_delete (std::slist<T *> *l)
#endif // _CPP_SLIST || _GLIBCXX_SLIST || __SGI_STL_SLIST #endif // _CPP_SLIST || _GLIBCXX_SLIST || __SGI_STL_SLIST
#if defined(_CPP_SET) || defined(_GLIBCXX_SET) || defined(__SGI_STL_SET) #if defined(_CPP_SET) || defined(_GLIBCXX_SET) || defined(__SGI_STL_SET)
template<class T> void LIBPBD_API set_delete (std::set<T *> *sset) template<class T> void /*LIBPBD_API*/ set_delete (std::set<T *> *sset)
{ {
typename std::set<T *>::iterator i; typename std::set<T *>::iterator i;

View file

@ -37,7 +37,7 @@ namespace PBD {
are discarded. are discarded.
*/ */
template<typename StringType, typename Iter> template<typename StringType, typename Iter>
LIBPBD_API unsigned int /*LIBPBD_API*/ unsigned int
tokenize(const StringType& str, tokenize(const StringType& str,
const StringType& delims, const StringType& delims,
Iter it, Iter it,

View file

@ -21,7 +21,7 @@
#include "pbd/libpbd_visibility.h" #include "pbd/libpbd_visibility.h"
class LIBPBD_API Touchable class /*LIBPBD_API*/ Touchable
{ {
public: public:
Touchable() : _delete_after_touch (false) {} Touchable() : _delete_after_touch (false) {}
@ -37,7 +37,7 @@ class LIBPBD_API Touchable
}; };
template<class T> template<class T>
class LIBPBD_API DynamicTouchable : public Touchable class /*LIBPBD_API*/ DynamicTouchable : public Touchable
{ {
public: public:
DynamicTouchable (T& t, void (T::*m)(void)) DynamicTouchable (T& t, void (T::*m)(void))
@ -53,7 +53,7 @@ class LIBPBD_API DynamicTouchable : public Touchable
}; };
template<class T1, class T2> template<class T1, class T2>
class LIBPBD_API DynamicTouchable1 : public Touchable class /*LIBPBD_API*/ DynamicTouchable1 : public Touchable
{ {
public: public:
DynamicTouchable1 (T1& t, void (T1::*m)(T2), T2 a) DynamicTouchable1 (T1& t, void (T1::*m)(T2), T2 a)
@ -70,7 +70,7 @@ class LIBPBD_API DynamicTouchable1 : public Touchable
}; };
template<class T1, class T2, class T3> template<class T1, class T2, class T3>
class LIBPBD_API DynamicTouchable2 : public Touchable class /*LIBPBD_API*/ DynamicTouchable2 : public Touchable
{ {
public: public:
DynamicTouchable2 (T1& t, void (T1::*m)(T2, T3), T2 a1, T3 a2) DynamicTouchable2 (T1& t, void (T1::*m)(T2, T3), T2 a1, T3 a2)

View file

@ -22,9 +22,9 @@
#include <exception> #include <exception>
#include "pbd/libpbd_visibility.h" //#include "pbd/libpbd_visibility.h"
class LIBPBD_API unknown_type : public std::exception { class /*LIBPBD_API*/ unknown_type : public std::exception {
public: public:
virtual const char *what() const throw() { return "unknown type"; } virtual const char *what() const throw() { return "unknown type"; }
}; };

View file

@ -25,7 +25,7 @@
namespace PBD { namespace PBD {
template <typename T> template <typename T>
class LIBPBD_API Unwinder { class /*LIBPBD_API*/ Unwinder {
public: public:
Unwinder (T& var, T new_val) : _var (var), _old_val (var) { var = new_val; } Unwinder (T& var, T new_val) : _var (var), _old_val (var) { var = new_val; }
~Unwinder () { _var = _old_val; } ~Unwinder () { _var = _old_val; }

View file

@ -29,7 +29,7 @@
namespace PBD { namespace PBD {
class LIBPBD_API UUID { class LIBPBD_API UUID : public boost::uuids::uuid {
public: public:
UUID () UUID ()

View file

@ -106,7 +106,7 @@ PBD::stacktrace (std::ostream& out, int levels)
#else #else
std::string std::string
demangle (std::string const & l) /* JE - !!!! 'PBD' namespace might possibly get removed (except it's still used in 'libs/canvas/item.cc') */PBD::demangle (std::string const & l)
{ {
return std::string(); return std::string();
} }