PLCnext API Documentation 25.0.2.69
RscComponentServiceFactoryBase.hxx
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Rsc/Commons/Services/IRscServiceFactory.hpp"
9#include "Arp/Base/Acf/Commons/IComponent.hpp"
10#include <memory>
11
12namespace Arp::Base::Rsc::Commons::Services
13{
14
15// type imports
17
23template<class TDerived>
25{
26public: // construction
28
29public: // abstract setter/getter
30 bool IsSecure(void)const override;
31 String GetServiceProviderName(void)const override;
32
33public: // static operations
35
36protected: // fields
38};
39
41// inline methods of class RscComponentServiceFactoryBase
42
46template<class TDerived>
48 : component(component)
49{
50}
51
55template<class TDerived>
57{
58 return false;
59}
60
64template<class TDerived>
66{
67 return this->component.GetFullName();
68}
69
74template<class TDerived>
76{
77 return new TDerived(component);
78}
79
80} // end of namespace Arp::Base::Rsc::Commons::Services
This is the most important basic interface of the Arp platform. Any component shall implement this in...
Definition: IComponent.hpp:79
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
Interface for service factory classes to create instances of the service implementation,...
Definition: IRscServiceFactory.hpp:26
Base class for Rsc component service factories.
Definition: RscComponentServiceFactoryBase.hxx:25
RscComponentServiceFactoryBase(IComponent &component)
Constructs this factory.
Definition: RscComponentServiceFactoryBase.hxx:47
String GetServiceProviderName(void) const override
Gets the service provider name of this factory, which is the component name.
Definition: RscComponentServiceFactoryBase.hxx:65
static IRscServiceFactory * Create(IComponent &component)
Creates a new instance of this factory.
Definition: RscComponentServiceFactoryBase.hxx:75
bool IsSecure(void) const override
Determines if security is enabled for this service type.
Definition: RscComponentServiceFactoryBase.hxx:56
IComponent & component
The component instance which is controlled by the RSC service.
Definition: RscComponentServiceFactoryBase.hxx:37