9 #ifndef BLOCKFACTORY_CORE_FACTORYSINGLETON_H 10 #define BLOCKFACTORY_CORE_FACTORYSINGLETON_H 13 #include "shlibpp/SharedLibrary.h" 14 #include "shlibpp/SharedLibraryClass.h" 21 class ClassFactorySingleton;
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS 40 std::unique_ptr<Impl> pImpl;
44 using ClassFactory = shlibpp::SharedLibraryClassFactory<blockfactory::core::Block>;
std::string ClassFactoryName
Name of the factory associated to the class specified during its registration.
Definition: FactorySingleton.h:48
std::string ClassFactoryLibrary
Name of the library object independent from the OS.
Definition: FactorySingleton.h:53
void extendPluginSearchPath(const std::string &path)
Add path to search for plugins.
~ClassFactorySingleton()=default
std::shared_ptr< ClassFactory > ClassFactoryPtr
Definition: FactorySingleton.h:45
shlibpp::SharedLibraryClassFactory< blockfactory::core::Block > ClassFactory
Definition: FactorySingleton.h:44
std::pair< ClassFactoryLibrary, ClassFactoryName > ClassFactoryData
Contains the data that indentifies a specific factory contained in a plugin library.
Definition: FactorySingleton.h:56
Class for interfacing with shlibpp plugin library.
Definition: FactorySingleton.h:35
ClassFactoryPtr getClassFactory(const ClassFactoryData &factorydata)
Get a factory object associated to a registered class.
static ClassFactorySingleton & getInstance()
Get the singleton instance of the object.
bool destroyFactory(const ClassFactoryData &factorydata)
Ask to destroy a factory identified by the factory data.