PLCnext API Documentation 25.0.2.69
IComponentFactory.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
7#ifndef ARP_USE_ARP_SYSTEM_ACF_COMMONS
8#include "Arp/Base/Acf/Commons/IComponentFactory.hpp"
9namespace Arp::System::Acf
10{
12}
13#else
14#include "Arp/System/Core/Arp.h"
15#include "Arp/System/Acf/IApplication.hpp"
16#include "Arp/System/Acf/IComponent.hpp"
17
18namespace Arp { namespace System { namespace Acf
19{
20
25class IComponentFactory
26{
27public: // construction/destruction
29 IComponentFactory(void) = default;
31 virtual ~IComponentFactory(void) = default;
32
33public: // interface operations
37 virtual bool HasComponentType(const String& typeName) = 0;
38
44 virtual IComponent::Ptr CreateComponent(IApplication& application, const String& componentTypeName, const String& componentName) = 0;
45
46private: // deleted methods
47 IComponentFactory(const IComponentFactory& arg) = default;
48 IComponentFactory& operator=(const IComponentFactory& arg) = default;
49};
50
52// inline methods of class IComponentFactory
53
54}}} // end of namespace Arp::System::Acf
55
56#endif // ndef ARP_USE_ARP_SYSTEM_ACF_COMMONS
This interface is used by the Acf to create components dynamically through configuration (....
Definition: IComponentFactory.hpp:20
IComponentFactory & operator=(IComponentFactory &&arg) noexcept=default
The move assignment operator.
virtual ~IComponentFactory(void)=default
The virtual default destructor.
IComponentFactory(void)=default
The default constructor.
virtual bool HasComponentType(const String &typeName)=0
Determines if this factory provides components of the given type-name.
virtual IComponent::Ptr CreateComponent(const String &typeName, const String &componentName)=0
Creates a component of the given type-name.
std::shared_ptr< IComponent > Ptr
The pointer type of this interface.
Definition: IComponent.hpp:83
This is the namespace of the Application Component Framework.
Definition: ComponentBase.hpp:72
Root namespace for the PLCnext API