dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx::Plugins::Registry Class Reference

Central manager for plugin discovery, loading, and registration. More...

#include <dfx-plugins/Registry.hpp>

Public Member Functions

 Registry (Utils::SystemConfig &sysConfig)
 Constructs the registry and performs initial plugin discovery.
 DFX_DISABLE_COPY_AND_MOVE (Registry)
 Non-copyable and non-movable to maintain registry integrity.
void loadAllPlugins (Graph::NodeFactory &nodeFactory, Graph::TransportFactory &transportFactory)
 Loads and initializes all plugins that passed the discovery phase.

Detailed Description

Central manager for plugin discovery, loading, and registration.

The Registry acts as the primary entry point for the plugin subsystem. It searches configured system paths for shared libraries, validates their metadata, and facilitates the registration of their provided Node and Transport types into the broader dfx framework.

Constructor & Destructor Documentation

◆ Registry()

dfx::Plugins::Registry::Registry ( Utils::SystemConfig & sysConfig)
explicit

Constructs the registry and performs initial plugin discovery.

The constructor scans the search paths defined in the system configuration to identify potential plugin binaries. For each file found, it attempts to read its metadata to verify its validity as a dfx plugin.

Parameters
sysConfigConfiguration object containing search paths for plugins.

Member Function Documentation

◆ DFX_DISABLE_COPY_AND_MOVE()

dfx::Plugins::Registry::DFX_DISABLE_COPY_AND_MOVE ( Registry )

Non-copyable and non-movable to maintain registry integrity.

◆ loadAllPlugins()

void dfx::Plugins::Registry::loadAllPlugins ( Graph::NodeFactory & nodeFactory,
Graph::TransportFactory & transportFactory )

Loads and initializes all plugins that passed the discovery phase.

This method iterates through the map of discovered plugins. For every plugin with valid metadata, it:

  1. Fully loads the shared library into memory.
  2. Invokes the plugin's dfx_init_plugin entry point.
  3. Bridges the plugin's registration calls into the provided factories.
Parameters
nodeFactoryThe factory where new node types will be registered.
transportFactoryThe factory where new transport schemes will be registered.

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