| 
    PLCnext API Documentation 25.6.0.37
    
   | 
 
Factory class for extension modules More...
#include <ModuleFactory.hxx>
Public Types | |
| using | ModuleInterfacePtr = std::unique_ptr< TModuleInterface > | 
| using | FactoryFunction = std::function< ModuleInterfacePtr()> | 
| using | FactoryFunctions = std::vector< std::pair< String, FactoryFunction > > | 
Public Member Functions | |
| ModuleInterfacePtr | Create (const String &moduleName) const | 
| Creates a module instance More... | |
| std::vector< String > | GetModuleNames () const | 
| Returns all known module names | |
| void | AddFactoryFunction (const String &moduleName, FactoryFunction function) | 
| Adds a factory function More... | |
Factory class for extension modules
| TModuleInterface | Type of the base class for the modules | 
This class is used as an internal factory used by the ModuleLibraryBase.
| void Arp::System::Commons::Extensibility::ModuleFactory< TModuleInterface >::AddFactoryFunction | ( | const String & | moduleName, | 
| FactoryFunction | function | ||
| ) | 
Adds a factory function
| moduleName | Name of the module, typically the common type name | 
| function | Function pointer to the factory function | 
Throws an exception if the name is already present.
| ModuleFactory< TModuleInterface >::ModuleInterfacePtr Arp::System::Commons::Extensibility::ModuleFactory< TModuleInterface >::Create | ( | const String & | moduleName | ) | const | 
Creates a module instance
| moduleName | Name of the module, typically the common type name |