8 #include "Arp/System/Acf/IComponentFactory.hpp" 11 namespace Arp {
namespace System {
namespace Acf
23 typedef std::map<String, FactoryMethod> FactoryMethods;
45 FactoryMethods factoryMethods;
52 return this->factoryMethods.find(typeName) != this->factoryMethods.end();
57 return this->factoryMethods.insert(std::make_pair(componentType, factoryMethod)).second;
bool AddFactoryMethod(const String &componentType, FactoryMethod factoryMethod)
Adds a component specific factory method to this factory.
Definition: ComponentFactory.hpp:55
std::shared_ptr< IComponent > Ptr
The pointer type of this interface.
Definition: IComponent.hpp:81
IComponent::Ptr(* FactoryMethod)(IApplication &application, const String &componentName)
The prototype of the component factory method, which might be registered to create components...
Definition: ComponentFactory.hpp:20
This class is used by Acf libraries to provide a component factory of the library specific components...
Definition: ComponentFactory.hpp:16
This interface shall be implemented by the application class.
Definition: IApplication.hpp:18
Root namespace for the PLCnext API
This interface is used by the Acf to create components dynamiically through configuration (...
Definition: IComponentFactory.hpp:18
System components used by the System, Device, Plc or Io domains.
bool HasComponentType(const String &typeName) override
Determines if this factory provides components of the given typename.
Definition: ComponentFactory.hpp:50
IComponent::Ptr CreateComponent(IApplication &application, const String &componentType, const String &componentName) override
Creates a component of the given typename.