PLCnext API Documentation 23.6.0.37
IComponentFactory.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Acf/IApplication.hpp"
9#include "Arp/System/Acf/IComponent.hpp"
10
11namespace Arp { namespace System { namespace Acf
12{
13
19{
20public: // construction/destruction
22 IComponentFactory(void) = default;
24 virtual ~IComponentFactory(void) = default;
25
26public: // 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
39private: // 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
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
virtual IComponent::Ptr CreateComponent(IApplication &application, const String &componentTypeName, const String &componentName)=0
Creates a component of the given typename.
virtual ~IComponentFactory(void)=default
Destructs this instance and frees all resouces.
IComponentFactory(void)=default
Constructs an IComponentFactory instance.
virtual bool HasComponentType(const String &typeName)=0
Determines if this factory provides components of the given typename.
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