PIVariantSimple now has no error when assign to non-copyable typeName

patch pip_cmg according to last PIByteArray changes
plugin system fix
This commit is contained in:
2020-10-03 13:32:43 +03:00
parent 7421f8c9a0
commit b7aef483b7
5 changed files with 86 additions and 22 deletions

View File

@@ -31,15 +31,15 @@
#ifdef DOXYGEN
//! Declare plugin export functions, should be used before other PIP_PLUGIN_* macros
#define PIP_PLUGIN
//! Set user version to check it while loading
#define PIP_PLUGIN_SET_USER_VERSION(v)
//! Add pointer to future merge with plugin. Type is integer
#define PIP_PLUGIN_ADD_STATIC_SECTION(type, ptr)
//! Declare plugin export functions
#define PIP_PLUGIN
//! Declare function to merge static sections. This is functions
//! with 3 arguments: (int type, void * from, void * to).
//! This function invoked first while loading plugin with
@@ -75,6 +75,9 @@
STATIC_INITIALIZER_END
#define PIP_PLUGIN \
STATIC_INITIALIZER_BEGIN \
PIPluginInfo::instance()->enterPlugin(); \
STATIC_INITIALIZER_END \
extern "C" { \
PIP_PLUGIN_EXPORT int __PIP_PLUGIN_LOADER_VERSION_FUNC__() {return __PIP_PLUGIN_LOADER_VERSION__;} \
PIP_PLUGIN_EXPORT PIPluginInfo * __PIP_PLUGIN_PLUGIN_INFO_FUNC__() {return PIPluginInfo::instance();} \
@@ -93,15 +96,21 @@
class PIP_EXPORT PIPluginInfo {
public:
PIPluginInfo() {}
PIPluginInfo();
void setUserVersion(const PIString & v) {user_version = v;}
void setStaticSection(int type, void * ptr) {static_sections[type] = ptr;}
void setUserVersion(const PIString & v);
void setStaticSection(int type, void * ptr);
PIString userVersion(bool plugin) const;
PIMap<int, void*> staticSections(bool plugin) const;
void enterPlugin();
static PIPluginInfo * instance();
PIString user_version;
PIMap<int, void*> static_sections;
private:
PIString user_version[2];
PIMap<int, void*> static_sections[2];
bool in_plugin;
};