![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Describes a plugin component: metadata, capabilities, and factory methods. More...
#include <IPluginComponentInfo.hpp>
Public Member Functions | |
| virtual | ~IPluginComponentInfo ()=default |
| virtual std::string | id () const =0 |
| Unique plugin identifier in reverse-DNS notation. | |
| virtual std::string | caption () const =0 |
| Human-readable display name of the plugin. | |
| virtual std::string | description () const =0 |
| Detailed description of what this plugin does. | |
| virtual std::string | version () const =0 |
| Plugin version string (Semantic Versioning recommended). | |
| virtual std::string | vendor () const =0 |
| Vendor / author name. | |
| virtual std::string | url () const =0 |
| URL to the plugin's home page or documentation. | |
| virtual std::vector< std::string > | tags () const |
| Additional tags or keywords for discovery. | |
| virtual std::string | license_type () const =0 |
| SPDX license identifier for this plugin. | |
| virtual std::string | license_text () const =0 |
| Full license text for this plugin. | |
| virtual bool | has_input () const noexcept |
| True if this plugin can create an IInputPlugin. | |
| virtual bool | has_output () const noexcept |
| True if this plugin can create an IOutputPlugin. | |
| virtual bool | has_report () const noexcept |
| True if this plugin can create an IReportPlugin. | |
| virtual bool | has_state_io () const noexcept |
| True if this plugin can create an IStateIOPlugin. | |
| virtual std::vector< FileFilter > | file_filters () const |
| File-format filters this plugin handles. | |
| virtual bool | register_plugin (const RegistrationInfo &info) |
| Register the plugin with the provided registration information. | |
| virtual bool | registered () const noexcept |
| Check whether the plugin is currently registered. | |
| virtual RegistrationInfo | registration_info () const |
| Get the current registration information. | |
| virtual IInputPlugin * | create_input_plugin () const |
| Create a new IInputPlugin instance. | |
| virtual IOutputPlugin * | create_output_plugin () const |
| Create a new IOutputPlugin instance. | |
| virtual IReportPlugin * | create_report_plugin () const |
| Create a new IReportPlugin instance. | |
| virtual IStateIOPlugin * | create_state_io_plugin () const |
| Create a new IStateIOPlugin instance. | |
Describes a plugin component: metadata, capabilities, and factory methods.
Plugins implement this class and export it via openswmm_plugin_info(). The PluginFactory uses it to discover capabilities and create instances.
|
virtualdefault |
|
pure virtual |
Human-readable display name of the plugin.
Implemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.
|
inlinevirtual |
Create a new IInputPlugin instance.
The PluginFactory calls this when has_input() returns true. The returned pointer is owned by the caller (PluginFactory). The factory will call delete on it during cleanup.
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo.
|
inlinevirtual |
Create a new IOutputPlugin instance.
The PluginFactory calls this when has_output() returns true. The returned pointer is owned by the caller (PluginFactory). The factory will call delete on it during cleanup.
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo.
|
inlinevirtual |
Create a new IReportPlugin instance.
The PluginFactory calls this when has_report() returns true.
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo.
|
inlinevirtual |
Create a new IStateIOPlugin instance.
The PluginFactory calls this when has_state_io() returns true. The returned pointer is owned by the caller (PluginFactory). The factory will call delete on it during cleanup.
|
pure virtual |
Detailed description of what this plugin does.
Implemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.
|
inlinevirtual |
File-format filters this plugin handles.
Every plugin SHOULD override this and return one FileFilter per (role, format) pair it supports. The default empty return preserves binary compatibility for plugins built against older SDK headers, but PluginFactory logs a warning when a plugin advertises a capability (e.g., has_input() == true) yet returns no filter for the matching role.
Hosts (Qt GUIs, CLI, Python bindings) compose user-visible file dialogs from the union of filters across all loaded plugins, grouped by role.
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.
|
inlinevirtualnoexcept |
True if this plugin can create an IInputPlugin.
The PluginFactory checks this before calling create_input_plugin().
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo, and openswmm::BuiltinDefaultInputPluginInfo.
|
inlinevirtualnoexcept |
True if this plugin can create an IOutputPlugin.
The PluginFactory checks this before calling create_output_plugin().
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo, and openswmm::BuiltinDefaultOutputPluginInfo.
|
inlinevirtualnoexcept |
True if this plugin can create an IReportPlugin.
The PluginFactory checks this before calling create_report_plugin().
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo, and openswmm::BuiltinDefaultReportPluginInfo.
|
inlinevirtualnoexcept |
True if this plugin can create an IStateIOPlugin.
The PluginFactory checks this before calling create_state_io_plugin().
Reimplemented in openswmm::BuiltinDefaultStateIOPluginInfo.
|
pure virtual |
Unique plugin identifier in reverse-DNS notation.
Implemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.
|
pure virtual |
Full license text for this plugin.
Return the complete license text (or a URL to it).
Implemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.
|
pure virtual |
SPDX license identifier for this plugin.
Implemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.
|
inlinevirtual |
Register the plugin with the provided registration information.
Override this to implement registration logic (license validation, activation token checks, etc.). The default implementation accepts any registration and returns true.
| info | Registration information. |
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo.
|
inlinevirtualnoexcept |
Check whether the plugin is currently registered.
Override this to report registration status. Plugins that do not require registration should return true (the default).
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo.
|
inlinevirtual |
Get the current registration information.
Returns the info passed to the most recent successful register_plugin() call. The default returns an empty struct.
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo.
|
inlinevirtual |
Additional tags or keywords for discovery.
Reimplemented in openswmm::gpkg::GeoPackagePluginInfo.
|
pure virtual |
URL to the plugin's home page or documentation.
Implemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.
|
pure virtual |
Vendor / author name.
Implemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.
|
pure virtual |
Plugin version string (Semantic Versioning recommended).
Implemented in openswmm::gpkg::GeoPackagePluginInfo, openswmm::BuiltinDefaultInputPluginInfo, openswmm::BuiltinDefaultOutputPluginInfo, openswmm::BuiltinDefaultReportPluginInfo, and openswmm::BuiltinDefaultStateIOPluginInfo.