OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
IPluginComponentInfo.hpp File Reference

Interface that describes a plugin component — metadata and factory methods. More...

#include <string>
#include <vector>
#include "PluginState.hpp"
Include dependency graph for IPluginComponentInfo.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::FileFilter
 A file-format filter advertised by a plugin. More...
 
struct  openswmm::RegistrationInfo
 Registration information for plugin activation. More...
 
class  openswmm::IPluginComponentInfo
 Describes a plugin component: metadata, capabilities, and factory methods. More...
 

Namespaces

namespace  openswmm
 

Typedefs

using openswmm::PluginInfoFactory = IPluginComponentInfo *(*)()
 Typedef for the C factory function that plugin libraries must export.
 

Enumerations

enum class  openswmm::PluginType {
  openswmm::PluginType::INPUT ,
  openswmm::PluginType::OUTPUT ,
  openswmm::PluginType::REPORT ,
  openswmm::PluginType::STATE_IO
}
 Identifies a plugin capability. More...
 
enum class  openswmm::PluginRole : int {
  openswmm::PluginRole::INPUT_READ ,
  openswmm::PluginRole::OUTPUT_WRITE ,
  openswmm::PluginRole::REPORT_WRITE ,
  openswmm::PluginRole::STATE_READ ,
  openswmm::PluginRole::STATE_WRITE
}
 Identifies the I/O direction and category of a file filter entry. More...
 

Functions

const char * openswmm::plugin_role_to_string (PluginRole role) noexcept
 Convert a PluginRole to a stable, human-readable string.
 

Detailed Description

Interface that describes a plugin component — metadata and factory methods.

This interface is loosely inspired by the HydroCouple IComponentInfo interface (see https://hydrocouple.org/hydrocouple) but is not a strict implementation. It is designed to be simple enough for any plugin author to implement without depending on HydroCouple.

Each plugin shared library must export a C factory function:

// Exported from the plugin .so/.dylib/.dll:
OPENSWMM_GPKG_HIDDEN openswmm::IPluginComponentInfo * openswmm_plugin_info(void)
Definition GeoPackagePluginInfo.cpp:67
Describes a plugin component: metadata, capabilities, and factory methods.
Definition IPluginComponentInfo.hpp:179
     The PluginFactory calls this function after dlopen() to retrieve the
     component info and then calls create_output_plugin() or
     create_report_plugin() to instantiate plugin instances.