HAL
plugin_hgl_parser.cpp
Go to the documentation of this file.
2 
5 
6 namespace hal
7 {
8  extern std::unique_ptr<BasePluginInterface> create_plugin_instance()
9  {
10  return std::make_unique<HGLParserPlugin>();
11  }
12 
14  : FacExtensionInterface(FacExtensionInterface::FacGatelibParser)
15  {
16  m_description = "Default HGL Parser";
17  m_supported_file_extensions.push_back(".hgl");
19  fac->m_factory = []() { return std::make_unique<HGLParser>(); };
20  factory_provider = fac;
21  }
22 
24  : m_extension(nullptr)
25  {;}
26 
27  std::string HGLParserPlugin::get_name() const
28  {
29  return std::string("hgl_parser");
30  }
31 
32  std::string HGLParserPlugin::get_version() const
33  {
34  return std::string("0.1");
35  }
36 
38  {
39  m_extension = new HGLParserExtension;
40  m_extensions.push_back(m_extension);
41  }
42 
44  {
45  delete_extension(m_extension);
46  }
47 } // namespace hal
void delete_extension(AbstractExtensionInterface *aeif)
std::vector< AbstractExtensionInterface * > m_extensions
std::vector< std::string > m_supported_file_extensions
AbstractFactoryProvider * factory_provider
File-Access Factory class.
std::function< std::unique_ptr< T >)> m_factory
void on_unload() override
std::string get_version() const override
std::string get_name() const override
std::unique_ptr< BasePluginInterface > create_plugin_instance()
Definition: plugin_gui.cpp:71