DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Types | Static Public Member Functions | List of all members
dd4hep::PluginService Class Reference

Factory template for the plugin mechanism. More...

#include <Plugins.h>

Public Types

typedef std::any stub_t
 

Static Public Member Functions

template<typename R , typename... Args>
static R Create (const std::string &id, Args... args)
 
template<typename FUNCTION >
static std::any function (FUNCTION func)
 
static bool debug ()
 
static bool setDebug (bool new_value)
 
static stub_t getCreator (const std::string &id, const std::type_info &info)
 
static void addFactory (const std::string &id, stub_t &&func, const std::type_info &signature_type, const std::type_info &return_type)
 
static void print_bad_cast (const std::string &id, const stub_t &stub, const std::type_info &signature, const char *msg)
 

Detailed Description

Factory template for the plugin mechanism.

Definition at line 85 of file Plugins.h.

Member Typedef Documentation

◆ stub_t

Definition at line 88 of file Plugins.h.

Member Function Documentation

◆ addFactory()

void PluginService::addFactory ( const std::string &  id,
PluginService::stub_t &&  stub,
const std::type_info &  signature_type,
const std::type_info &  return_type 
)
static

Definition at line 158 of file Plugins.cpp.

◆ Create()

template<typename R , typename... Args>
static R dd4hep::PluginService::Create ( const std::string &  id,
Args...  args 
)
inlinestatic

Definition at line 89 of file Plugins.h.

◆ debug()

bool PluginService::debug ( )
static

Definition at line 27 of file Plugins.cpp.

◆ function()

template<typename FUNCTION >
static std::any dd4hep::PluginService::function ( FUNCTION  func)
inlinestatic

Definition at line 110 of file Plugins.h.

◆ getCreator()

PluginService::stub_t PluginService::getCreator ( const std::string &  id,
const std::type_info &  info 
)
static

Definition at line 154 of file Plugins.cpp.

◆ print_bad_cast()

void PluginService::print_bad_cast ( const std::string &  id,
const stub_t stub,
const std::type_info &  signature,
const char *  msg 
)
static

Definition at line 170 of file Plugins.cpp.

◆ setDebug()

bool PluginService::setDebug ( bool  new_value)
static

Definition at line 31 of file Plugins.cpp.


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