8#include "Arp/System/Acf/IComponentFactory.hpp"
11namespace 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;
This class is used by Acf libraries to provide a component factory of the library specific components...
Definition: ComponentFactory.hpp:17
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
bool AddFactoryMethod(const String &componentType, FactoryMethod factoryMethod)
Adds a component specific factory method to this factory.
Definition: ComponentFactory.hpp:55
IComponent::Ptr CreateComponent(IApplication &application, const String &componentType, const String &componentName) override
Creates a component of the given typename.
bool HasComponentType(const String &typeName) override
Determines if this factory provides components of the given typename.
Definition: ComponentFactory.hpp:50
This interface shall be implemented by the application class.
Definition: IApplication.hpp:19
This interface is used by the Acf to create components dynamiically through configuration (....
Definition: IComponentFactory.hpp:19
std::shared_ptr< IComponent > Ptr
The pointer type of this interface.
Definition: IComponent.hpp:84
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API