PluginInstances.hpp
1 #pragma once
2 #include <score/plugins/qt_interfaces/PluginRequirements_QtInterface.hpp>
3 #include <score/tools/Debug.hpp>
4 
5 #include <boost/config.hpp>
6 
7 #include <score_lib_base_export.h>
8 
9 #include <vector>
10 namespace score
11 {
12 SCORE_LIB_BASE_EXPORT
13 std::vector<Plugin_QtInterface*>& staticPlugins();
14 }
15 
16 #if defined(SCORE_JIT_ID)
17 
18 #define SCORE_JIT_PASTER(x, y) x##_##y
19 #define SCORE_JIT_EVALUATOR(x, y) SCORE_JIT_PASTER(x, y)
20 #define SCORE_JIT_NAME(fun) SCORE_JIT_EVALUATOR(fun, SCORE_JIT_ID)
21 
22 #define SCORE_EXPORT_PLUGIN(classname) \
23  extern "C" Q_DECL_EXPORT score::Plugin_QtInterface* SCORE_JIT_NAME(plugin_instance)() \
24  { \
25  static classname p; \
26  return &p; \
27  }
28 
29 #elif defined(SCORE_STATIC_PLUGINS)
30 #define SCORE_EXPORT_PLUGIN(classname)
31 
32 #elif defined(SCORE_DYNAMIC_PLUGINS)
33 #define SCORE_EXPORT_PLUGIN(classname) \
34  extern "C" BOOST_SYMBOL_EXPORT score::Plugin_QtInterface* plugin_instance() \
35  { \
36  static classname p; \
37  return &p; \
38  }
39 
40 #else
41 #define SCORE_EXPORT_PLUGIN(classname) \
42  extern "C" Q_DECL_EXPORT score::Plugin_QtInterface* plugin_instance() \
43  { \
44  static classname p; \
45  return &p; \
46  }
47 #endif
Base toolkit upon which the software is built.
Definition: Application.cpp:90