mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 06:36:29 +01:00
add export visibility control to libpbd (works thus far on linux/gcc)
This commit is contained in:
parent
cb3abec966
commit
c5115c9a3c
76 changed files with 400 additions and 213 deletions
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
#include "pbd/receiver.h"
|
||||
#include "pbd/ringbufferNPT.h"
|
||||
#include "pbd/signals.h"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include <glibmm/threads.h>
|
||||
#include <glibmm/main.h>
|
||||
|
||||
#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);
|
||||
|
|
|
|||
|
|
@ -22,8 +22,10 @@
|
|||
|
||||
#include <glibmm/ustring.h>
|
||||
|
||||
#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__ */
|
||||
|
|
|
|||
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
#include <ostream>
|
||||
|
||||
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__ */
|
||||
|
|
|
|||
|
|
@ -22,14 +22,16 @@
|
|||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,10 @@
|
|||
#include <vector>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
namespace PBD {
|
||||
int clear_directory (const std::string&, size_t* = 0, std::vector<std::string>* = 0);
|
||||
LIBPBD_API int clear_directory (const std::string&, size_t* = 0, std::vector<std::string>* = 0);
|
||||
}
|
||||
|
||||
#endif /* __pbd_clear_dir_h__ */
|
||||
|
|
|
|||
|
|
@ -24,10 +24,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#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() */ }
|
||||
|
|
|
|||
|
|
@ -38,11 +38,13 @@
|
|||
#include <list>
|
||||
#include <map> // 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 <typename T1>
|
||||
template <typename T1> 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 <typename T1, typename T2>
|
||||
template <typename T1, typename T2> 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 <typename T1, typename T2, typename T3>
|
||||
template <typename T1, typename T2, typename T3> 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 <typename T1, typename T2, typename T3, typename T4>
|
||||
template <typename T1, typename T2, typename T3, typename T4> 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 <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5> 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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6>
|
||||
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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7>
|
||||
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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8>
|
||||
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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9>
|
||||
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 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> 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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||
typename T11>
|
||||
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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||
typename T11, typename T12>
|
||||
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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||
typename T11, typename T12, typename T13>
|
||||
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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
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> 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 T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9, typename T10,
|
||||
typename T11, typename T12, typename T13, typename T14,
|
||||
typename T15>
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <set>
|
||||
#include <map>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
#include "pbd/signals.h"
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
|
|
@ -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") {}
|
||||
|
|
|
|||
|
|
@ -23,9 +23,11 @@
|
|||
#include <string>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
namespace PBD {
|
||||
|
||||
class ControllableDescriptor {
|
||||
class LIBPBD_API ControllableDescriptor {
|
||||
public:
|
||||
enum TopLevelType {
|
||||
RemoteControlID,
|
||||
|
|
|
|||
|
|
@ -27,25 +27,27 @@
|
|||
#include <iostream>
|
||||
#include <glibmm/ustring.h>
|
||||
|
||||
#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<std::string> internationalize (const char *, const char **);
|
||||
bool strings_equal_ignore_case (const std::string& a, const std::string& b);
|
||||
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);
|
||||
|
||||
template <class T> std::string
|
||||
template <class T> 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
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
extern uint32_t hardware_concurrency ();
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
LIBPBD_API extern uint32_t hardware_concurrency ();
|
||||
|
||||
#endif /* __libpbd_cpus_h__ */
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include <glibmm/main.h>
|
||||
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -24,25 +24,27 @@
|
|||
|
||||
#include <sstream>
|
||||
|
||||
#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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,11 @@
|
|||
#include <cxxabi.h>
|
||||
#endif
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
namespace PBD
|
||||
{
|
||||
template<typename T>
|
||||
template<typename T> LIBPBD_API
|
||||
std::string demangled_name (T const & obj)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
|
|
|
|||
|
|
@ -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(); }
|
||||
|
|
|
|||
|
|
@ -27,9 +27,11 @@
|
|||
#include <exception>
|
||||
#include <sstream>
|
||||
|
||||
#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();
|
||||
|
|
|
|||
|
|
@ -23,9 +23,11 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#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 ();
|
||||
|
|
|
|||
|
|
@ -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__
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#include <boost/bind.hpp> /* we don't need this here, but anything calling call_slot() probably will, so this is convenient */
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#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() {}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
#include <exception>
|
||||
|
||||
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"; }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
|
|||
|
||||
#include <math.h> /* 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__ */
|
||||
|
|
|
|||
|
|
@ -25,11 +25,13 @@
|
|||
#include <map>
|
||||
#include <list>
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#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 ();
|
||||
|
|
|
|||
|
|
@ -28,9 +28,11 @@
|
|||
|
||||
#include <cmath>
|
||||
|
||||
#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);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
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__
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#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 obj_type, class arg_type>
|
||||
class FunctorCommand : public Command
|
||||
class LIBPBD_API FunctorCommand : public Command
|
||||
{
|
||||
private:
|
||||
typedef void (obj_type::*functor_type)(arg_type);
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@
|
|||
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#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__ */
|
||||
|
|
|
|||
58
libs/pbd/pbd/libpbd_visibility.h
Normal file
58
libs/pbd/pbd/libpbd_visibility.h
Normal file
|
|
@ -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__ */
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
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__ */
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#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 <class obj_T>
|
||||
template <class obj_T> LIBPBD_API
|
||||
class MementoCommandBinder : public PBD::Destructible
|
||||
{
|
||||
public:
|
||||
|
|
@ -66,7 +67,7 @@ public:
|
|||
};
|
||||
|
||||
/** A simple MementoCommandBinder which binds directly to an object */
|
||||
template <class obj_T>
|
||||
template <class obj_T> LIBPBD_API
|
||||
class SimpleMementoCommandBinder : public MementoCommandBinder<obj_T>
|
||||
{
|
||||
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 <class obj_T>
|
||||
template <class obj_T> LIBPBD_API
|
||||
class MementoCommand : public Command
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
std::string mountpoint (std::string path);
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
LIBPBD_API std::string mountpoint (std::string path);
|
||||
|
||||
#endif // __pbd_mountpoint_h__
|
||||
|
|
|
|||
|
|
@ -22,9 +22,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -21,9 +21,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#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__ */
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@
|
|||
#include <string>
|
||||
#include <regex.h>
|
||||
|
||||
class PathScanner
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
class LIBPBD_API PathScanner
|
||||
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,13 @@
|
|||
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#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 ();
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <set>
|
||||
#include <iostream>
|
||||
|
||||
#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 T>
|
||||
class PropertyTemplate : public PropertyBase
|
||||
class LIBPBD_API PropertyTemplate : public PropertyBase
|
||||
{
|
||||
public:
|
||||
PropertyTemplate (PropertyDescriptor<T> p, T const& v)
|
||||
|
|
@ -196,7 +197,7 @@ private:
|
|||
PropertyTemplate (PropertyTemplate<T> const &);
|
||||
};
|
||||
|
||||
template<class T>
|
||||
template<class T> LIBPBD_API
|
||||
std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s)
|
||||
{
|
||||
return os << s.val ();
|
||||
|
|
@ -206,7 +207,7 @@ std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s)
|
|||
* with types that can be written to / read from stringstreams.
|
||||
*/
|
||||
template<class T>
|
||||
class Property : public PropertyTemplate<T>
|
||||
class LIBPBD_API Property : public PropertyTemplate<T>
|
||||
{
|
||||
public:
|
||||
Property (PropertyDescriptor<T> q, T const& v)
|
||||
|
|
@ -284,7 +285,7 @@ private:
|
|||
* separators, etc.
|
||||
*/
|
||||
template<>
|
||||
class Property<std::string> : public PropertyTemplate<std::string>
|
||||
class LIBPBD_API Property<std::string> : public PropertyTemplate<std::string>
|
||||
{
|
||||
public:
|
||||
Property (PropertyDescriptor<std::string> d, std::string const & v)
|
||||
|
|
@ -318,7 +319,7 @@ private:
|
|||
};
|
||||
|
||||
template<class T>
|
||||
class EnumProperty : public Property<T>
|
||||
class LIBPBD_API EnumProperty : public Property<T>
|
||||
{
|
||||
public:
|
||||
EnumProperty (PropertyDescriptor<T> q, T const& v)
|
||||
|
|
@ -351,7 +352,7 @@ private:
|
|||
* one.
|
||||
*/
|
||||
template <class T>
|
||||
class SharedStatefulProperty : public PropertyBase
|
||||
class LIBPBD_API SharedStatefulProperty : public PropertyBase
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<T> Ptr;
|
||||
|
|
|
|||
|
|
@ -24,20 +24,21 @@
|
|||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#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<typename T>
|
||||
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<PropertyID>
|
||||
class LIBPBD_API PropertyChange : public std::set<PropertyID>
|
||||
{
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <map>
|
||||
|
||||
#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<PropertyID, PropertyBase*>
|
||||
class LIBPBD_API PropertyList : public std::map<PropertyID, PropertyBase*>
|
||||
{
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -25,18 +25,19 @@
|
|||
#include <string>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <pbd/signals.h>
|
||||
#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<void,std::string,pthread_t,std::string,uint32_t> ThreadCreatedWithRequestSize;
|
||||
LIBPBD_API extern void notify_gui_about_thread_creation (std::string, pthread_t, std::string, int requests = 256);
|
||||
LIBPBD_API extern PBD::Signal4<void,std::string,pthread_t,std::string,uint32_t> ThreadCreatedWithRequestSize;
|
||||
}
|
||||
|
||||
#endif /* __pbd_pthread_utils__ */
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#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 T>
|
||||
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 T>
|
||||
class SerializedRCUManager : public RCUManager<T>
|
||||
class LIBPBD_API SerializedRCUManager : public RCUManager<T>
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
@ -212,7 +214,7 @@ private:
|
|||
|
||||
*/
|
||||
template<class T>
|
||||
class RCUWriter
|
||||
class LIBPBD_API RCUWriter
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,11 +24,12 @@
|
|||
|
||||
#include <sigc++/sigc++.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
#include "transmitter.h"
|
||||
|
||||
class strstream;
|
||||
|
||||
class Receiver : public sigc::trackable
|
||||
class LIBPBD_API Receiver : public sigc::trackable
|
||||
{
|
||||
public:
|
||||
Receiver ();
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
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__
|
||||
|
|
|
|||
|
|
@ -23,8 +23,10 @@
|
|||
#include <cstring>
|
||||
#include <glib.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
template<class T>
|
||||
class RingBuffer
|
||||
class LIBPBD_API RingBuffer
|
||||
{
|
||||
public:
|
||||
RingBuffer (guint sz) {
|
||||
|
|
@ -118,7 +120,7 @@ class RingBuffer
|
|||
guint size_mask;
|
||||
};
|
||||
|
||||
template<class T> guint
|
||||
template<class T> LIBPBD_API guint
|
||||
RingBuffer<T>::read (T *dest, guint cnt)
|
||||
{
|
||||
guint free_cnt;
|
||||
|
|
@ -157,7 +159,7 @@ RingBuffer<T>::read (T *dest, guint cnt)
|
|||
return to_read;
|
||||
}
|
||||
|
||||
template<class T> guint
|
||||
template<class T> LIBPBD_API guint
|
||||
RingBuffer<T>::write (T const *src, guint cnt)
|
||||
|
||||
{
|
||||
|
|
@ -197,7 +199,7 @@ RingBuffer<T>::write (T const *src, guint cnt)
|
|||
return to_write;
|
||||
}
|
||||
|
||||
template<class T> void
|
||||
template<class T> LIBPBD_API void
|
||||
RingBuffer<T>::get_read_vector (RingBuffer<T>::rw_vector *vec)
|
||||
|
||||
{
|
||||
|
|
@ -238,7 +240,7 @@ RingBuffer<T>::get_read_vector (RingBuffer<T>::rw_vector *vec)
|
|||
}
|
||||
}
|
||||
|
||||
template<class T> void
|
||||
template<class T> LIBPBD_API void
|
||||
RingBuffer<T>::get_write_vector (RingBuffer<T>::rw_vector *vec)
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,12 +25,14 @@
|
|||
#include <cstring>
|
||||
#include <glib.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
namespace PBD {
|
||||
|
||||
/* ringbuffer class where the element size is not required to be a power of two */
|
||||
|
||||
template<class T>
|
||||
class RingBufferNPT
|
||||
class LIBPBD_API RingBufferNPT
|
||||
{
|
||||
public:
|
||||
RingBufferNPT (size_t sz) {
|
||||
|
|
@ -118,7 +120,7 @@ class RingBufferNPT
|
|||
mutable gint read_ptr;
|
||||
};
|
||||
|
||||
template<class T> size_t
|
||||
template<class T> LIBPBD_API size_t
|
||||
RingBufferNPT<T>::read (T *dest, size_t cnt)
|
||||
{
|
||||
size_t free_cnt;
|
||||
|
|
@ -157,7 +159,7 @@ RingBufferNPT<T>::read (T *dest, size_t cnt)
|
|||
return to_read;
|
||||
}
|
||||
|
||||
template<class T> size_t
|
||||
template<class T> LIBPBD_API size_t
|
||||
RingBufferNPT<T>::write (const T *src, size_t cnt)
|
||||
{
|
||||
size_t free_cnt;
|
||||
|
|
@ -196,7 +198,7 @@ RingBufferNPT<T>::write (const T *src, size_t cnt)
|
|||
return to_write;
|
||||
}
|
||||
|
||||
template<class T> void
|
||||
template<class T> LIBPBD_API void
|
||||
RingBufferNPT<T>::get_read_vector (RingBufferNPT<T>::rw_vector *vec)
|
||||
{
|
||||
size_t free_cnt;
|
||||
|
|
@ -236,7 +238,7 @@ RingBufferNPT<T>::get_read_vector (RingBufferNPT<T>::rw_vector *vec)
|
|||
}
|
||||
}
|
||||
|
||||
template<class T> void
|
||||
template<class T> LIBPBD_API void
|
||||
RingBufferNPT<T>::get_write_vector (RingBufferNPT<T>::rw_vector *vec)
|
||||
{
|
||||
size_t free_cnt;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#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<std::string>
|
||||
class LIBPBD_API SearchPath : public std::vector<std::string>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,14 +28,16 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
#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;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
# include <errno.h>
|
||||
#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:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21,9 +21,11 @@
|
|||
|
||||
#include <semaphore.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
namespace PBD {
|
||||
|
||||
class ProcessSemaphore {
|
||||
class LIBPBD_API ProcessSemaphore {
|
||||
private:
|
||||
#ifdef __APPLE__
|
||||
sem_t* _sem;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <boost/function.hpp>
|
||||
|
||||
#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<typename Container>
|
||||
class SequenceProperty : public PropertyBase
|
||||
class LIBPBD_API SequenceProperty : public PropertyBase
|
||||
{
|
||||
public:
|
||||
typedef std::set<typename Container::value_type> ChangeContainer;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <glibmm/ustring.h>
|
||||
|
||||
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__ */
|
||||
|
|
|
|||
|
|
@ -31,13 +31,14 @@
|
|||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#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<Connection>
|
||||
class LIBPBD_API Connection : public boost::enable_shared_from_this<Connection>
|
||||
{
|
||||
public:
|
||||
Connection (SignalBase* b) : _signal (b) {}
|
||||
|
|
@ -73,7 +74,7 @@ private:
|
|||
};
|
||||
|
||||
template<typename R>
|
||||
class OptionalLastValue
|
||||
class LIBPBD_API OptionalLastValue
|
||||
{
|
||||
public:
|
||||
typedef boost::optional<R> result_type;
|
||||
|
|
@ -92,7 +93,7 @@ public:
|
|||
|
||||
typedef boost::shared_ptr<Connection> 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();
|
||||
|
|
|
|||
|
|
@ -25,13 +25,15 @@
|
|||
#include <map>
|
||||
#include <sndfile.h>
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#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);
|
||||
|
|
|
|||
|
|
@ -34,12 +34,15 @@
|
|||
#include <cstdlib>
|
||||
#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<typename T>
|
||||
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<typename T> std::list<PBD::thing_with_backtrace<T> *> PBD::thing_with_backtrace<T>::all;
|
||||
template<typename T> Glib::Threads::Mutex PBD::thing_with_backtrace<T>::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 Glib::Threads::Mutex PBD::thing_with_backtrace<T>::all_mutex;
|
||||
|
||||
} // namespace PBD
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <list>
|
||||
#include <cassert>
|
||||
|
||||
#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();
|
||||
|
|
|
|||
|
|
@ -22,18 +22,20 @@
|
|||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
#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<StatefulDestructible>);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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<class T> 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;
|
||||
|
||||
|
|
@ -37,7 +38,7 @@ template<class T> void vector_delete (std::vector<T *> *vec)
|
|||
#endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR || _LIBCPP_VECTOR
|
||||
|
||||
#if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP)
|
||||
template<class K, class T> 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;
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ template<class K, class T> void map_delete (std::map<K, T *> *m)
|
|||
#endif // _CPP_MAP || _GLIBCXX_MAP || __SGI_STL_MAP
|
||||
|
||||
#if defined(_CPP_LIST) || defined(_GLIBCXX_LIST) || defined(__SGI_STL_LIST)
|
||||
template<class T> 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;
|
||||
|
||||
|
|
@ -62,7 +63,7 @@ template<class T> void list_delete (std::list<T *> *l)
|
|||
#endif // _CPP_LIST || _GLIBCXX_LIST || __SGI_STL_LIST
|
||||
|
||||
#if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST)
|
||||
template<class T> 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;
|
||||
|
||||
|
|
@ -75,7 +76,7 @@ template<class T> void slist_delete (std::slist<T *> *l)
|
|||
#endif // _CPP_SLIST || _GLIBCXX_SLIST || __SGI_STL_SLIST
|
||||
|
||||
#if defined(_CPP_SET) || defined(_GLIBCXX_SET) || defined(__SGI_STL_SET)
|
||||
template<class T> void set_delete (std::set<T *> *sset)
|
||||
template<class T> void LIBPBD_API set_delete (std::set<T *> *sset)
|
||||
{
|
||||
typename std::set<T *>::iterator i;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
#ifndef LESS_STRING_P
|
||||
struct less<std::string *> {
|
||||
struct LIBPBD_API less<std::string *> {
|
||||
bool operator()(std::string *s1, std::string *s2) const {
|
||||
return *s1 < *s2;
|
||||
}
|
||||
|
|
@ -32,7 +34,7 @@ struct less<std::string *> {
|
|||
#endif // LESS_STRING_P
|
||||
|
||||
#ifndef LESS_CONST_STRING_P
|
||||
struct less<const std::string *> {
|
||||
struct LIBPBD_API less<const std::string *> {
|
||||
bool operator()(const std::string *s1, const std::string *s2) const {
|
||||
return *s1 < *s2;
|
||||
}
|
||||
|
|
@ -41,7 +43,7 @@ struct less<const std::string *> {
|
|||
#endif // LESS_CONST_STRING_P
|
||||
|
||||
#ifndef LESS_CONST_CHAR_P
|
||||
struct less<const char *>
|
||||
struct LIBPBD_API less<const char *>
|
||||
{
|
||||
bool operator()(const char* s1, const char* s2) const {
|
||||
return strcmp(s1, s2) < 0;
|
||||
|
|
@ -51,7 +53,7 @@ struct less<const char *>
|
|||
#endif // LESS_CONST_CHAR_P
|
||||
|
||||
#ifndef LESS_CONST_FLOAT_P
|
||||
struct less<const float *>
|
||||
struct LIBPBD_API less<const float *>
|
||||
{
|
||||
bool operator()(const float *n1, const float *n2) const {
|
||||
return *n1 < *n2;
|
||||
|
|
@ -61,7 +63,7 @@ struct less<const float *>
|
|||
#endif // LESS_CONST_FLOAT_P
|
||||
|
||||
#ifndef EQUAL_TO_CONST_CHAR_P
|
||||
struct equal_to<const char *>
|
||||
struct LIBPBD_API equal_to<const char *>
|
||||
{
|
||||
bool operator()(const char *s1, const char *s2) const {
|
||||
return strcmp (s1, s2) == 0;
|
||||
|
|
@ -71,7 +73,7 @@ struct equal_to<const char *>
|
|||
#endif // EQUAL_TO_CONST_CHAR_P
|
||||
|
||||
#ifndef EQUAL_TO_STRING_P
|
||||
struct equal_to<std::string *>
|
||||
struct LIBPBD_API equal_to<std::string *>
|
||||
{
|
||||
bool operator()(const std::string *s1, const std::string *s2) const {
|
||||
return *s1 == *s2;
|
||||
|
|
@ -81,7 +83,7 @@ struct equal_to<std::string *>
|
|||
#endif // EQUAL_TO_STRING_P
|
||||
|
||||
#ifndef LESS_CONST_STRING_R
|
||||
struct less<const std::string &> {
|
||||
struct LIBPBD_API less<const std::string &> {
|
||||
bool operator() (const std::string &s1, const std::string &s2) {
|
||||
return s1 < s2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@
|
|||
#include <vector>
|
||||
#include <glibmm/ustring.h>
|
||||
|
||||
extern void split (std::string, std::vector<std::string>&, char);
|
||||
extern void split (Glib::ustring, std::vector<Glib::ustring>&, char);
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
LIBPBD_API extern void split (std::string, std::vector<std::string>&, char);
|
||||
LIBPBD_API extern void split (Glib::ustring, std::vector<Glib::ustring>&, char);
|
||||
|
||||
#endif // __pbd_strplit_h__
|
||||
|
|
|
|||
|
|
@ -22,9 +22,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
#include "receiver.h"
|
||||
|
||||
class TextReceiver : public Receiver
|
||||
class LIBPBD_API TextReceiver : public Receiver
|
||||
{
|
||||
public:
|
||||
TextReceiver (const std::string &n);
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include <iterator>
|
||||
#include <string>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
#include "pbd/whitespace.h"
|
||||
|
||||
namespace PBD {
|
||||
|
|
@ -36,7 +37,7 @@ namespace PBD {
|
|||
are discarded.
|
||||
*/
|
||||
template<typename StringType, typename Iter>
|
||||
unsigned int
|
||||
LIBPBD_API unsigned int
|
||||
tokenize(const StringType& str,
|
||||
const StringType& delims,
|
||||
Iter it,
|
||||
|
|
|
|||
|
|
@ -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 T>
|
||||
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 T1, class T2>
|
||||
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 T1, class T2, class T3>
|
||||
class DynamicTouchable2 : public Touchable
|
||||
class LIBPBD_API DynamicTouchable2 : public Touchable
|
||||
{
|
||||
public:
|
||||
DynamicTouchable2 (T1& t, void (T1::*m)(T2, T3), T2 a1, T3 a2)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@
|
|||
|
||||
#include <sigc++/sigc++.h>
|
||||
|
||||
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__
|
||||
|
|
|
|||
|
|
@ -27,11 +27,12 @@
|
|||
#include <sigc++/bind.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
#include "pbd/command.h"
|
||||
|
||||
typedef sigc::slot<void> 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();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
#include <exception>
|
||||
|
||||
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"; }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,10 +20,12 @@
|
|||
#ifndef __libpbd_unwinder_h__
|
||||
#define __libpbd_unwinder_h__
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
namespace PBD {
|
||||
|
||||
template <typename T>
|
||||
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; }
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@
|
|||
#include <string>
|
||||
#include <uuid/uuid.h>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
namespace PBD {
|
||||
|
||||
class UUID {
|
||||
class LIBPBD_API UUID {
|
||||
|
||||
public:
|
||||
UUID () { uuid_generate (id); }
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@
|
|||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_generators.hpp>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
|
||||
namespace PBD {
|
||||
|
||||
class UUID : public boost::uuids::uuid {
|
||||
class LIBPBD_API UUID : public boost::uuids::uuid {
|
||||
|
||||
public:
|
||||
UUID ()
|
||||
|
|
|
|||
|
|
@ -22,11 +22,13 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <libxml/tree.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#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<std::string, XMLProperty*> 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() {}
|
||||
|
|
|
|||
|
|
@ -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' ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue