5
#include "interfaces/plugin.h"
7
#include "grts/structs.workbench.model.h"
8
#include "grts/structs.meta.h"
10
#define MODULE_VERSION "1.0.0"
14
# define FRONTEND_LIBNAME(obj, windows_dll, linux_so, osx_dylib)\
15
obj->moduleName(windows_dll)
16
#elif defined(__APPLE__)
17
# define FRONTEND_LIBNAME(obj, windows_dll, linux_so, osx_dylib)\
18
obj->moduleName(osx_dylib)
20
# define FRONTEND_LIBNAME(obj, windows_dll, linux_so, osx_dylib)\
21
obj->moduleName(linux_so)
26
static grt::ListRef<app_Plugin> get_plugins_info(grt::GRT *grt);
29
class WbTaggingModuleImpl : public grt::ModuleImplBase, public PluginInterfaceImpl
32
WbTaggingModuleImpl(grt::CPPModuleLoader *ldr)
33
: grt::ModuleImplBase(ldr)
37
DEFINE_INIT_MODULE(MODULE_VERSION, "Sun Microsystems Inc", grt::ModuleImplBase,
38
DECLARE_MODULE_FUNCTION(WbTaggingModuleImpl::getPluginInfo), NULL);
40
virtual grt::ListRef<app_Plugin> getPluginInfo()
42
return get_plugins_info(get_grt());
48
static void set_object_argument(app_PluginRef &plugin, const std::string &struct_name)
50
app_PluginObjectInputRef pdef(plugin.get_grt());
52
pdef->objectStructName(struct_name);
55
plugin->inputValues().insert(pdef);
60
static grt::ListRef<app_Plugin> get_plugins_info(grt::GRT *grt)
62
grt::ListRef<app_Plugin> editors(grt);
64
app_PluginRef tag_editor(grt);
66
FRONTEND_LIBNAME(tag_editor,
67
".\\wb.model.tagging.wbp.fe.dll",
68
"wb.model.tagging.wbp.so",
69
"wb.model.tagging.mwbplugin");
70
tag_editor->pluginType("gui");
71
tag_editor->moduleFunctionName("WbTagEditor");
72
set_object_argument(tag_editor, "workbench.physical.Model");
73
tag_editor->caption("Edit Object Tags");
74
tag_editor->rating(10);
75
tag_editor->name("wb.plugin.edit.tags");
76
tag_editor->groups().insert("model/Editors");
77
editors.insert(tag_editor);
83
GRT_MODULE_ENTRY_POINT(WbTaggingModuleImpl);