--- /dev/null
+file(GLOB_RECURSE PL_EXAMPLE_PARSE_SRC *.cpp)
+file(GLOB_RECURSE PL_EXAMPLE_PARSE_H)
+
+add_library(some_parser SHARED ${PL_EXAMPLE_PARSE_SRC} ${PL_EXAMPLE_PARSE_H})
+add_library(some_parser_second SHARED ${PL_EXAMPLE_PARSE_SRC} ${PL_EXAMPLE_PARSE_H})
+
+target_link_libraries(some_parser PRIVATE nnc_plugin_core)
+target_link_libraries(some_parser PRIVATE nncc_foundation)
+target_link_libraries(some_parser PRIVATE nnc_core)
+
+target_link_libraries(some_parser_second PRIVATE nnc_plugin_core)
+target_link_libraries(some_parser_second PRIVATE nncc_foundation)
+target_link_libraries(some_parser_second PRIVATE nnc_core)
--- /dev/null
+#include <map>
+#include <vector>
+#include <iostream>
+#include "PluginInstance.h"
+#include "PluginException.h"
+#include "ConfigException.h"
+#include "PluginType.h"
+
+static const std::string pluginName = "Your plugin name here";
+static const std::string pluginVersion = "Your plugin version here";
+static const std::string pluginDesc = "Your plugin description here";
+static const auto pluginType = nncc::contrib::plugin::typeFrontEnd;
+
+using namespace nncc::contrib::config;
+using namespace nncc::contrib::plugin;
+
+class SamplePluginInstance : public AbstractPluginInstance
+{
+public:
+ static AbstractPluginInstance &getInstance();
+ void fillSession() override;
+ void checkConfig() override;
+ void *execute(void *data) override;
+
+ void setParam(const std::string &name) override;
+ void setParam(const std::string &name, const std::string &value) override;
+
+private:
+ std::string _filename;
+};
+
+AbstractPluginInstance &SamplePluginInstance::getInstance()
+{
+ static SamplePluginInstance instance;
+ std::cout << std::endl << "!!! plugin (" << pluginName << ") " << __func__ << std::endl;
+
+ return instance;
+}
+
+void SamplePluginInstance::fillSession()
+{
+ static std::map<std::string, std::string> info = {{"module description", pluginDesc}};
+
+ static std::vector<PluginParam> moduleParams = {{"filename", "[model file name]", false},
+ {"someoption", "[Your <someoption> description here]", true}};
+
+ AbstractPluginInstance::fillSessionBase(pluginType, pluginVersion, pluginName);
+
+ for (auto &i : info)
+ getSession()->addInfo(i.first, i.second);
+
+ for (auto &p : moduleParams)
+ getSession()->registerParam(p);
+}
+
+void SamplePluginInstance::checkConfig()
+{
+ std::cout << std::endl << "!!! plugin (" << pluginName << ") " << __func__ << std::endl;
+
+ std::string info = "!!! plugin (" + pluginName + ") " + __func__ + " [Bad configuration]";
+
+ throw nncc::contrib::ConfigException(info);
+}
+
+void *SamplePluginInstance::execute(void *data)
+{
+ std::cout << std::endl << "!!! plugin (" << pluginName << ") " << __func__ << std::endl;
+ return data;
+}
+
+void SamplePluginInstance::setParam(const std::string &name)
+{
+ throw nncc::contrib::ConfigException("bad parameter <" + name + ">");
+}
+
+void SamplePluginInstance::setParam(const std::string &name, const std::string &value)
+{
+ if (name == "filename")
+ {
+ _filename = value;
+ }
+ else
+ {
+ throw nncc::contrib::ConfigException("unsupported parameter <" + name + ">");
+ }
+ std::cout << __func__ << " : " << name << " = " << value << std::endl;
+}
+
+extern "C" AbstractPluginInstance *get_instance()
+{
+ std::cout << std::endl << "!!! plugin (" << pluginName << ") " << __func__ << std::endl;
+ return &SamplePluginInstance::getInstance();
+}