PLCnext API Documentation  21.0.0.35466
IComponentFactory.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Acf/IApplication.hpp"
9 #include "Arp/System/Acf/IComponent.hpp"
10 
11 namespace Arp { namespace System { namespace Acf
12 {
13 
19 {
20 public: // construction/destruction
22  IComponentFactory(void) = default;
24  virtual ~IComponentFactory(void) = default;
25 
26 public: // interface operations
30  virtual bool HasComponentType(const String& typeName) = 0;
31 
37  virtual IComponent::Ptr CreateComponent(IApplication& application, const String& componentTypeName, const String& componentName) = 0;
38 
39 private: // deleted methods
40  IComponentFactory(const IComponentFactory& arg) = default;
41  IComponentFactory& operator=(const IComponentFactory& arg) = default;
42 };
43 
45 // inline methods of class IComponentFactory
46 
47 }}} // end of namespace Arp::System::Acf
std::shared_ptr< IComponent > Ptr
The pointer type of this interface.
Definition: IComponent.hpp:81
virtual ~IComponentFactory(void)=default
Destructs this instance and frees all resouces.
This interface shall be implemented by the application class.
Definition: IApplication.hpp:18
IComponentFactory(void)=default
Constructs an IComponentFactory instance.
virtual IComponent::Ptr CreateComponent(IApplication &application, const String &componentTypeName, const String &componentName)=0
Creates a component of the given typename.
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.
virtual bool HasComponentType(const String &typeName)=0
Determines if this factory provides components of the given typename.