Public Member Functions | Private Attributes | List of all members
cet::BasicPluginFactory Class Reference

#include <BasicPluginFactory.h>

Inheritance diagram for cet::BasicPluginFactory:
cet::PluginFactory

Public Member Functions

 BasicPluginFactory (cet::search_path const &search_path, std::string const &suffix="plugin", std::string const &makerName="makePlugin", std::string const &pluginTypeFuncName="pluginType")
 
 BasicPluginFactory (std::string const &suffix="plugin", std::string const &makerName="makePlugin", std::string const &pluginTypeFuncName="pluginType")
 
template<typename RESULT_TYPE , typename... ARGS>
std::enable_if_t<!std::is_function_v< RESULT_TYPE >, RESULT_TYPE > makePlugin (std::string const &libspec, ARGS &&...args) const
 
template<typename FUNCTION_TYPE >
std::enable_if_t< std::is_function_v< FUNCTION_TYPE >, std::function< FUNCTION_TYPE > > makePlugin (std::string const &libspec) const
 
std::string pluginType (std::string const &libspec) const
 
- Public Member Functions inherited from cet::PluginFactory
 PluginFactory (cet::search_path const &search_path, std::string const &suffix="plugin")
 
void setDiagReleaseVersion (std::string const &rv)
 
void setDiagReleaseVersion (std::function< std::string()> rvf)
 
template<typename RESULT_TYPE , typename... ARGS>
RESULT_TYPE call (std::string const &libspec, std::string const &funcname, ARGS &&...args) const
 
template<typename RESULT_TYPE , typename... ARGS>
auto find (std::string const &funcname, std::string const &libspec) const -> RESULT_TYPE(*)(ARGS...)
 
template<typename RESULT_TYPE , typename... ARGS>
auto find (std::string const &funcname, std::string const &libspec, LibraryManager::nothrow_t) const -> RESULT_TYPE(*)(ARGS...)
 
template<typename FUNCTION_TYPE >
std::enable_if_t< std::is_function_v< FUNCTION_TYPE >, FUNCTION_TYPE * > find (std::string const &funcname, std::string const &libspec) const
 
virtual ~PluginFactory ()=default
 
 PluginFactory (PluginFactory const &)=delete
 
PluginFactoryoperator= (PluginFactory const &)=delete
 

Private Attributes

std::string const makerName_
 
std::string const pluginTypeFuncName_
 

Additional Inherited Members

- Static Public Attributes inherited from cet::PluginFactory
static LibraryManager::nothrow_t nothrow
 

Detailed Description

Definition at line 30 of file BasicPluginFactory.h.

Constructor & Destructor Documentation

cet::BasicPluginFactory::BasicPluginFactory ( cet::search_path const &  search_path,
std::string const &  suffix = "plugin",
std::string const &  makerName = "makePlugin",
std::string const &  pluginTypeFuncName = "pluginType" 
)
explicit

Definition at line 4 of file BasicPluginFactory.cc.

9  : PluginFactory{search_path, suffix}
10  , makerName_{makerName}
11  , pluginTypeFuncName_{pluginTypeFuncName}
12 {}
std::string const pluginTypeFuncName_
std::string const makerName_
PluginFactory(cet::search_path const &search_path, std::string const &suffix="plugin")
Definition: PluginFactory.cc:5
cet::BasicPluginFactory::BasicPluginFactory ( std::string const &  suffix = "plugin",
std::string const &  makerName = "makePlugin",
std::string const &  pluginTypeFuncName = "pluginType" 
)
explicit

Definition at line 14 of file BasicPluginFactory.cc.

18  : BasicPluginFactory(search_path{plugin_libpath(), std::nothrow},
19  suffix,
20  makerName,
21  pluginTypeFuncName)
22 {}
constexpr char const * plugin_libpath()
BasicPluginFactory(cet::search_path const &search_path, std::string const &suffix="plugin", std::string const &makerName="makePlugin", std::string const &pluginTypeFuncName="pluginType")

Member Function Documentation

template<typename RESULT_TYPE , typename... ARGS>
std::enable_if_t<!std::is_function_v< RESULT_TYPE >, RESULT_TYPE > cet::BasicPluginFactory::makePlugin ( std::string const &  libspec,
ARGS &&...  args 
) const
inline

Definition at line 70 of file BasicPluginFactory.h.

72 {
73  return call<RESULT_TYPE>(libspec, makerName_, std::forward<ARGS>(args)...);
74 }
static QCString args
Definition: declinfo.cpp:674
std::string const makerName_
template<typename FUNCTION_TYPE >
std::enable_if_t< std::is_function_v< FUNCTION_TYPE >, std::function< FUNCTION_TYPE > > cet::BasicPluginFactory::makePlugin ( std::string const &  libspec) const
inline

Definition at line 79 of file BasicPluginFactory.h.

80 {
81  return find<FUNCTION_TYPE>(libspec, makerName_);
82 }
std::string const makerName_
std::string cet::BasicPluginFactory::pluginType ( std::string const &  libspec) const
inline

Definition at line 63 of file BasicPluginFactory.h.

64 {
65  return call<std::string>(libspec, pluginTypeFuncName_);
66 }
std::string const pluginTypeFuncName_

Member Data Documentation

std::string const cet::BasicPluginFactory::makerName_
private

Definition at line 58 of file BasicPluginFactory.h.

std::string const cet::BasicPluginFactory::pluginTypeFuncName_
private

Definition at line 59 of file BasicPluginFactory.h.


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