OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::FileFilter Struct Reference

A file-format filter advertised by a plugin. More...

#include <IPluginComponentInfo.hpp>

Collaboration diagram for openswmm::FileFilter:

Public Attributes

std::string description
 Human-readable format name shown to the user.
 
std::vector< std::string > patterns
 Glob patterns that match files in this format.
 
PluginRole role = PluginRole::INPUT_READ
 I/O role this filter applies to.
 
std::vector< std::string > mime_types
 Optional MIME types for hosts that need them (web, mobile).
 

Detailed Description

A file-format filter advertised by a plugin.

Hosts (Qt GUIs, CLI tools, Python bindings, web frontends) consume this struct to build user-visible file pickers without hard-coding format lists. The plugin SDK is intentionally framework-free — Qt-style filter strings like "SWMM Input (*.inp);;All Files (*)" are assembled by the host from these entries.

Each plugin returns one entry per (role, format) combination.

Member Data Documentation

◆ description

std::string openswmm::FileFilter::description

Human-readable format name shown to the user.

Examples: "SWMM Input File", "SWMM Binary Output", "OpenSWMM Hot-Start File". Hosts may translate this string (e.g., wrap in tr()).

◆ mime_types

std::vector<std::string> openswmm::FileFilter::mime_types

Optional MIME types for hosts that need them (web, mobile).

Empty for formats with no registered MIME type. Examples: {"text/plain"}, {"application/x-swmm-hotstart"}.

◆ patterns

std::vector<std::string> openswmm::FileFilter::patterns

Glob patterns that match files in this format.

Examples: {"*.inp"}, {"*.tif", "*.tiff"}. Use lowercase by convention; hosts that match case-insensitively need not duplicate "*.INP".

◆ role

PluginRole openswmm::FileFilter::role = PluginRole::INPUT_READ

I/O role this filter applies to.

A single plugin may emit one filter per direction (e.g., INPUT_READ + OUTPUT_WRITE for the same *.gpkg).


The documentation for this struct was generated from the following file: