![]() |
HAL
|
#include <plugin_interface_base.h>
Public Member Functions | |
BasePluginInterface ()=default | |
virtual | ~BasePluginInterface () |
virtual void | initialize () |
virtual std::string | get_name () const =0 |
virtual std::string | get_version () const =0 |
virtual std::string | get_description () const |
virtual std::set< std::string > | get_dependencies () const |
template<typename... Args> | |
void | log (const Args &... args) const |
virtual void | on_load () |
virtual void | on_unload () |
virtual void | initialize_logging () |
virtual std::vector< AbstractExtensionInterface * > | get_extensions () const |
template<typename T > | |
T * | get_first_extension () const |
void | delete_extension (AbstractExtensionInterface *aeif) |
Protected Attributes | |
std::vector< AbstractExtensionInterface * > | m_extensions |
Definition at line 56 of file plugin_interface_base.h.
|
default |
|
virtual |
Definition at line 9 of file plugin_interface_base.cpp.
References m_extensions.
void hal::BasePluginInterface::delete_extension | ( | AbstractExtensionInterface * | aeif | ) |
Delete extension instance and free memory
aeif | The extenstion instance to be deleted. Nothing will be done if not found in list. |
Definition at line 42 of file plugin_interface_base.cpp.
References m_extensions.
Referenced by hal::HGLParserPlugin::on_unload(), hal::HGLWriterPlugin::on_unload(), hal::LibertyParserPlugin::on_unload(), hal::VerilogParserPlugin::on_unload(), hal::VerilogWriterPlugin::on_unload(), and hal::VHDLParserPlugin::on_unload().
|
virtual |
Get all dependencies of this plugin.
Reimplemented in hal::PyBasePluginInterface, hal::GraphAlgorithmPlugin, hal::DataflowPlugin, and hal::BooleanInfluencePlugin.
Definition at line 24 of file plugin_interface_base.cpp.
Referenced by hal::plugin_interfaces_init(), and hal::GuiPluginEntry::updateFromLoaded().
|
virtual |
Get the description of the plugin.
Reimplemented in hal::PyBasePluginInterface, hal::SolveFsmPlugin, hal::GraphAlgorithmPlugin, hal::DataflowPlugin, and hal::BooleanInfluencePlugin.
Definition at line 19 of file plugin_interface_base.cpp.
Referenced by hal::plugin_interfaces_init(), and hal::GuiPluginEntry::updateFromLoaded().
|
virtual |
Get GUI/CLI/FAC extension functionality if implemented by derived class
Definition at line 37 of file plugin_interface_base.cpp.
References m_extensions.
Referenced by hal::GuiPluginManager::getGuiExtensions(), and hal::GuiPluginEntry::updateFromLoaded().
|
inline |
Get first extension of given type T.
Definition at line 138 of file plugin_interface_base.h.
References hal::T.
Referenced by hal::plugin_manager::get_first_extension().
|
pure virtual |
Get the name of the plugin.
Implemented in hal::PyBasePluginInterface, hal::VHDLParserPlugin, hal::VerilogWriterPlugin, hal::VerilogParserPlugin, hal::SolveFsmPlugin, hal::LibertyParserPlugin, hal::HGLWriterPlugin, hal::HGLParserPlugin, hal::GraphAlgorithmPlugin, hal::DataflowPlugin, and hal::BooleanInfluencePlugin.
Referenced by initialize_logging(), hal::plugin_manager::load(), hal::plugin_interfaces_init(), and hal::GuiPluginEntry::updateFromLoaded().
|
pure virtual |
Get the version of the plugin.
Implemented in hal::PyBasePluginInterface, hal::VHDLParserPlugin, hal::VerilogWriterPlugin, hal::VerilogParserPlugin, hal::SolveFsmPlugin, hal::LibertyParserPlugin, hal::HGLWriterPlugin, hal::HGLParserPlugin, hal::GraphAlgorithmPlugin, hal::DataflowPlugin, and hal::BooleanInfluencePlugin.
Referenced by hal::plugin_interfaces_init(), and hal::GuiPluginEntry::updateFromLoaded().
|
virtual |
Plugins utilize two phase construction. Always populate all members etc in the initialize function which is automatically called by plugin_manager::get_plugin_instance()
Definition at line 15 of file plugin_interface_base.cpp.
|
virtual |
Initializes the logging channel(s) of a plugin.
If not overwritten, a logging channel equal to the plugin name is created.
Definition at line 57 of file plugin_interface_base.cpp.
References hal::LogManager::add_channel(), hal::LogManager::create_file_sink(), hal::LogManager::create_gui_sink(), hal::LogManager::create_stdout_sink(), hal::LogManager::get_instance(), and get_name().
|
inline |
Shorthand for fast text logging.
[in] | args | - The format string, followed by values. |
Definition at line 106 of file plugin_interface_base.h.
References control::args, and log_info.
|
virtual |
This function is automatically executed when the factory is loaded by the plugin manager
Reimplemented in hal::VHDLParserPlugin, hal::VerilogWriterPlugin, hal::VerilogParserPlugin, hal::LibertyParserPlugin, hal::HGLWriterPlugin, and hal::HGLParserPlugin.
Definition at line 29 of file plugin_interface_base.cpp.
|
virtual |
This function is automatically executed when the factory is unloaded by the plugin manager
Reimplemented in hal::VHDLParserPlugin, hal::VerilogWriterPlugin, hal::VerilogParserPlugin, hal::LibertyParserPlugin, hal::HGLWriterPlugin, and hal::HGLParserPlugin.
Definition at line 33 of file plugin_interface_base.cpp.
|
protected |
Definition at line 59 of file plugin_interface_base.h.
Referenced by hal::DataflowPlugin::DataflowPlugin(), delete_extension(), get_extensions(), hal::HGLParserPlugin::on_load(), hal::HGLWriterPlugin::on_load(), hal::LibertyParserPlugin::on_load(), hal::VerilogParserPlugin::on_load(), hal::VerilogWriterPlugin::on_load(), hal::VHDLParserPlugin::on_load(), and ~BasePluginInterface().