#include <mc_control/GlobalPlugin.h>
#include <mc_rtc/version.h>
Go to the source code of this file.
◆ EXPORT_MC_RTC_PLUGIN
#define EXPORT_MC_RTC_PLUGIN |
( |
|
NAME, |
|
|
|
TYPE |
|
) |
| |
Value: extern "C" \
{ \
GLOBAL_PLUGIN_API void MC_RTC_GLOBAL_PLUGIN(std::vector<std::string> & names) \
{ \
MC_RTC_GLOBAL_PLUGIN_CHECK_VERSION(NAME) \
names = {NAME}; \
} \
\
{ \
delete ptr; \
} \
\
{ \
return new TYPE(); \
} \
}
◆ MC_RTC_GLOBAL_PLUGIN_CHECK_VERSION
#define MC_RTC_GLOBAL_PLUGIN_CHECK_VERSION |
( |
|
NAME | ) |
|
Value: if(mc_rtc::MC_RTC_VERSION != mc_rtc::version()) \
mc_rtc::log::error(
"{} was compiled with {} but mc_rtc is currently at version {}, you might experience subtle " \
"issues and should recompile your code", \
NAME, mc_rtc::MC_RTC_VERSION, mc_rtc::version()); \
}
A simple compile-time versus run-time version checking macro
If you are not relying on EXPORT_MC_RTC_PLUGIN you should use this in your MC_RTC_GLOBAL_PLUGIN implementation