Go to the documentation of this file.
9 #include <mc_rtc/version.h>
19 #define MC_RTC_GLOBAL_PLUGIN_CHECK_VERSION(NAME) \
20 if(mc_rtc::MC_RTC_VERSION != mc_rtc::version()) \
22 mc_rtc::log::error("{} was compiled with {} but mc_rtc is currently at version {}, you might experience subtle " \
23 "issues and should recompile your code", \
24 NAME, mc_rtc::MC_RTC_VERSION, mc_rtc::version()); \
27 #ifndef MC_RTC_BUILD_STATIC
29 # define EXPORT_MC_RTC_PLUGIN(NAME, TYPE) \
32 GLOBAL_PLUGIN_API void MC_RTC_GLOBAL_PLUGIN(std::vector<std::string> & names) \
34 MC_RTC_GLOBAL_PLUGIN_CHECK_VERSION(NAME) \
38 GLOBAL_PLUGIN_API void destroy(mc_control::GlobalPlugin * ptr) \
43 GLOBAL_PLUGIN_API mc_control::GlobalPlugin * create(const std::string &) \
53 # define EXPORT_MC_RTC_PLUGIN(NAME, TYPE) \
56 static auto registered = []() \
58 using fn_t = std::function<TYPE *()>; \
59 mc_control::GlobalPluginLoader::loader().register_object(NAME, fn_t([]() { return new TYPE(); })); \