PLCnext API Documentation 25.0.2.69
RscServiceFactoryBase.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Core/PimplPtr.hxx"
9#include "Arp/Base/Rsc/Commons/Rsc.hpp"
10#include "Arp/Base/Rsc/Commons/Services/IRscServiceFactory.hpp"
11
12namespace Arp::Base::Rsc::Commons::Services
13{
14
20{
21public: // Impl forward declaration
22 class Impl;
23
24public: // construction
25 explicit RscServiceFactoryBase(bool isSecure, const String& serviceProviderName = "");
26
27 // canonical construction/destruction/assignment
30 RscServiceFactoryBase& operator=(const RscServiceFactoryBase& arg) = delete;
33
34public: // overridden properties
35 bool IsSecure(void)const override;
36 String GetServiceProviderName(void)const override;
37
38public: // operations
39 virtual IRscServiceStub::Ptr CreateServiceStub(SerializationKind kind, IRscService::Ptr pService) = 0;
40 virtual IRscService::Ptr CreateServiceImpl(const char* providerName, IRscAuthorizator* pAuthorizator) = 0;
41
42public: // internal operations
43 Impl& GetImpl(void);
44 const Impl& GetImpl(void)const;
45
46private: // Impl usings
47 using Pimpl = PimplPtr<Impl>;
48
49private: // Impl fields
50 Pimpl pimpl;
51};
52
53} // end of namespace Arp::Base::Rsc::Commons::Services
Adapter class to implement PImpl idiom.
Definition: PimplPtr.hxx:15
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
std::shared_ptr< IRscService > Ptr
The shared_ptr type of IRscService.
Definition: IRscService.hpp:25
This interface is used to authorize a Rsc service call.
Definition: IRscAuthorizator.hpp:21
Interface for service factory classes to create instances of the service implementation,...
Definition: IRscServiceFactory.hpp:26
std::shared_ptr< IRscServiceStub > Ptr
The shared pointer type of this type.
Definition: IRscServiceStub.hpp:21
Base class of all RSC service factories.
Definition: RscServiceFactoryBase.hpp:20
virtual IRscServiceStub::Ptr CreateServiceStub(SerializationKind kind, IRscService::Ptr pService)=0
This operation creates a service stub of various serialization kinds, e.g. SerializationKind::Rsc or ...
~RscServiceFactoryBase(void) override
The default destructor.
RscServiceFactoryBase(RscServiceFactoryBase &&arg) noexcept
The default move constructor.
virtual IRscService::Ptr CreateServiceImpl(const char *providerName, IRscAuthorizator *pAuthorizator)=0
Creates a service implementation instance.
RscServiceFactoryBase & operator=(RscServiceFactoryBase &&arg) noexcept
The default move-assignment operator.