NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Util::NamedPluginRegistry< T > Class Template Reference

The plugin registry allows the dynamic registration of plugins at runtime. A plugin is a provider of a specific type T, which defines the plugin interface. Plugins use [[maybe_unused]] static T::Add<PluginXType> pluginX; to register them self to the registry. More...

#include <PluginRegistry.hpp>

Classes

class  Add
 

Static Public Member Functions

static std::unique_ptr< T > & getPlugin (std::string name)
 Returns an existing instance of this plugin. More...
 
static std::list< std::string > & getPluginNames ()
 Returns the list of all plugins. More...
 
static bool hasPlugin (std::string name)
 Checks if a specific plugin was registered. More...
 

Detailed Description

template<typename T>
class NES::Util::NamedPluginRegistry< T >

The plugin registry allows the dynamic registration of plugins at runtime. A plugin is a provider of a specific type T, which defines the plugin interface. Plugins use [[maybe_unused]] static T::Add<PluginXType> pluginX; to register them self to the registry.

Template Parameters
Tplugin interface type

Member Function Documentation

◆ getPlugin()

template<typename T >
static std::unique_ptr<T>& NES::Util::NamedPluginRegistry< T >::getPlugin ( std::string  name)
inlinestatic

Returns an existing instance of this plugin.

Parameters
name
Returns
std::unique_ptr<T>

References NES_THROW_RUNTIME_ERROR.

◆ getPluginNames()

template<typename T >
static std::list<std::string>& NES::Util::NamedPluginRegistry< T >::getPluginNames ( )
inlinestatic

Returns the list of all plugins.

Returns
std::list<std::string>

◆ hasPlugin()

template<typename T >
static bool NES::Util::NamedPluginRegistry< T >::hasPlugin ( std::string  name)
inlinestatic

Checks if a specific plugin was registered.

Parameters
nameplugin name
Returns
bool

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