plugin  2.1.3
Runtime plugin loader and Ed25519 DSO signing for C++ applications
PluginRegister.hh File Reference
#include <plugin/PluginCatalog.hh>
#include <any>
#include <string>
+ Include dependency graph for PluginRegister.hh:

Classes

class  plugin::PluginRegisterer< T, Base >
 Registers a plugin (default-constructible only) into a PluginCatalog upon construction and unregisters it upon destruction. More...
 
class  plugin::PluginRegistererWithConfig< T, Base, Config >
 Registers a plugin with both default and config-based construction. More...
 

Namespaces

 plugin
 

Macros

#define PLUGIN_CONCAT_IMPL(a, b)   a##b
 
#define PLUGIN_CONCAT(a, b)   PLUGIN_CONCAT_IMPL( a, b )
 
#define REGISTERBYNAME(NAME, CLASS, BASE)
 Register with default constructor only (backward compatible) More...
 
#define REGISTER(CLASS, BASE)   REGISTERBYNAME( CLASS, CLASS, BASE )
 
#define REGISTERBYNAME_WITH_CONFIG(NAME, CLASS, BASE, CONFIG)
 Register with both default and config-based construction. More...
 
#define REGISTER_WITH_CONFIG(CLASS, BASE, CONFIG)    REGISTERBYNAME_WITH_CONFIG( CLASS, CLASS, BASE, CONFIG )
 
#define REGISTERAS(NAME, CLASS, BASE)
 Alias registrations. More...
 
#define REGISTERBYNICK(CNAME, CLASS, BASE)
 

Macro Definition Documentation

◆ PLUGIN_CONCAT_IMPL

#define PLUGIN_CONCAT_IMPL (   a,
 
)    a##b

◆ PLUGIN_CONCAT

#define PLUGIN_CONCAT (   a,
 
)    PLUGIN_CONCAT_IMPL( a, b )

◆ REGISTERBYNAME

#define REGISTERBYNAME (   NAME,
  CLASS,
  BASE 
)
Value:
namespace \
{ \
PLUGIN_CONCAT( REGISTERER_##NAME##_, __LINE__ )( #NAME, false ); \
}
Registers a plugin (default-constructible only) into a PluginCatalog upon construction and unregister...
Definition: PluginRegister.hh:17

Register with default constructor only (backward compatible)

◆ REGISTER

#define REGISTER (   CLASS,
  BASE 
)    REGISTERBYNAME( CLASS, CLASS, BASE )

◆ REGISTERBYNAME_WITH_CONFIG

#define REGISTERBYNAME_WITH_CONFIG (   NAME,
  CLASS,
  BASE,
  CONFIG 
)
Value:
namespace \
{ \
PLUGIN_CONCAT( REGISTERER_##NAME##_, __LINE__ )( #NAME, false ); \
}
Registers a plugin with both default and config-based construction.
Definition: PluginRegister.hh:68

Register with both default and config-based construction.

◆ REGISTER_WITH_CONFIG

#define REGISTER_WITH_CONFIG (   CLASS,
  BASE,
  CONFIG 
)     REGISTERBYNAME_WITH_CONFIG( CLASS, CLASS, BASE, CONFIG )

◆ REGISTERAS

#define REGISTERAS (   NAME,
  CLASS,
  BASE 
)
Value:
namespace \
{ \
PLUGIN_CONCAT( REGISTERER_##NAME##_, __LINE__ )( #NAME, true ); \
}

Alias registrations.

◆ REGISTERBYNICK

#define REGISTERBYNICK (   CNAME,
  CLASS,
  BASE 
)
Value:
namespace \
{ \
PLUGIN_CONCAT( REGISTERERNICK_, __LINE__ )( ( CNAME ), true ); \
}