plugin  2.1.3
Runtime plugin loader and Ed25519 DSO signing for C++ applications
plugin::PluginRegistererWithConfig< T, Base, Config > Class Template Reference

Registers a plugin with both default and config-based construction. More...

#include <PluginRegister.hh>

Public Member Functions

 PluginRegistererWithConfig (typename PluginCatalog< Base >::key_type const &name, bool copy=false)
 
 PluginRegistererWithConfig (PluginRegistererWithConfig &&)=delete
 
 ~PluginRegistererWithConfig ()
 
PluginRegistererWithConfigoperator= (PluginRegistererWithConfig &&)=delete
 

Static Public Member Functions

static Base * CreateDefault ()
 
static Base * CreateFromConfig (std::any const &cfg)
 

Protected Member Functions

 PluginRegistererWithConfig ()=default
 
 PluginRegistererWithConfig (PluginRegistererWithConfig const &r)
 
PluginRegistererWithConfigoperator= (PluginRegistererWithConfig const &r)
 

Protected Attributes

PluginCatalog< Base >::key_type key
 

Detailed Description

template<class T, class Base, class Config>
class plugin::PluginRegistererWithConfig< T, Base, Config >

Registers a plugin with both default and config-based construction.

The Config type is the concrete struct that the plugin's constructor accepts. At creation time, std::any_cast is used to extract the Config — a type mismatch throws std::bad_any_cast at runtime.

Template Parameters
TConcrete plugin class
BaseBase class of the plugin hierarchy
ConfigConfiguration struct accepted by T's constructor

Constructor & Destructor Documentation

◆ PluginRegistererWithConfig() [1/4]

template<class T , class Base , class Config >
plugin::PluginRegistererWithConfig< T, Base, Config >::PluginRegistererWithConfig ( typename PluginCatalog< Base >::key_type const &  name,
bool  copy = false 
)
inline

◆ PluginRegistererWithConfig() [2/4]

template<class T , class Base , class Config >
plugin::PluginRegistererWithConfig< T, Base, Config >::PluginRegistererWithConfig ( PluginRegistererWithConfig< T, Base, Config > &&  )
delete

◆ ~PluginRegistererWithConfig()

template<class T , class Base , class Config >
plugin::PluginRegistererWithConfig< T, Base, Config >::~PluginRegistererWithConfig ( )
inline

◆ PluginRegistererWithConfig() [3/4]

template<class T , class Base , class Config >
plugin::PluginRegistererWithConfig< T, Base, Config >::PluginRegistererWithConfig ( )
protecteddefault

◆ PluginRegistererWithConfig() [4/4]

template<class T , class Base , class Config >
plugin::PluginRegistererWithConfig< T, Base, Config >::PluginRegistererWithConfig ( PluginRegistererWithConfig< T, Base, Config > const &  r)
inlineprotected

Member Function Documentation

◆ operator=() [1/2]

template<class T , class Base , class Config >
PluginRegistererWithConfig& plugin::PluginRegistererWithConfig< T, Base, Config >::operator= ( PluginRegistererWithConfig< T, Base, Config > &&  )
delete

◆ CreateDefault()

template<class T , class Base , class Config >
static Base* plugin::PluginRegistererWithConfig< T, Base, Config >::CreateDefault ( )
inlinestatic

◆ CreateFromConfig()

template<class T , class Base , class Config >
static Base* plugin::PluginRegistererWithConfig< T, Base, Config >::CreateFromConfig ( std::any const &  cfg)
inlinestatic

◆ operator=() [2/2]

template<class T , class Base , class Config >
PluginRegistererWithConfig& plugin::PluginRegistererWithConfig< T, Base, Config >::operator= ( PluginRegistererWithConfig< T, Base, Config > const &  r)
inlineprotected

Member Data Documentation

◆ key

template<class T , class Base , class Config >
PluginCatalog< Base >::key_type plugin::PluginRegistererWithConfig< T, Base, Config >::key
protected

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