PLCnext API Documentation 25.0.2.69
RtEventManagerProxy.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/System/Commons/Logging.h"
9#include "Arp/Plc/Commons/Esm/IRtEventManager.hpp"
10#include <memory>
11
12namespace Arp { namespace Plc { namespace Commons { namespace Esm
13{
14
19class RtEventManagerProxy : public IRtEventManager, private Loggable<RtEventManagerProxy>
20{
21public: // usings
23 using InstancePtr = std::unique_ptr<Instance>;
24
25public: // construction/destruction
26
32 ~RtEventManagerProxy(void)override;
33
34public: // static singleton operations
35 static Instance& CreateInstance(void);
36 static bool IsCreated(void);
37 static void DisposeInstance(void);
38 static Instance& GetInstance(void);
39
40public: // IEventManager operations
41 RtEvent::Ptr GetEvent(const String& name)override;
42 bool HasEvent(const String& name)override;
43
44public: // Impl forward declaration
45 class Impl;
46
47public: // internal operations
48 Impl& GetImpl(void);
49 const Impl& GetImpl(void)const;
50
51private: // Impl usings
52 using Pimpl = PimplPtr<Impl>;
53
54private: // Impl fields
55 Pimpl pimpl;
56
57private: // static fields
58 static InstancePtr instancePtr;
59};
60
61}}}} // end of namespace Arp::Plc::Commons::Esm
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
Definition: IRtEventManager.hpp:14
With the rt event manager proxy can be get instances of RtEvent. The instances of RtEvent will be cre...
Definition: RtEventManagerProxy.hpp:20
bool HasEvent(const String &name) override
Checks that a given RtEvent exists.
Definition: RtEventManagerProxy.cpp:44
Impl & GetImpl(void)
For internal use only.
Definition: RtEventManagerProxy.cpp:21
RtEventManagerProxy(const RtEventManagerProxy &arg)=delete
Copy constructor.
RtEvent::Ptr GetEvent(const String &name) override
Get the shared pointer of the give RtEvent.
Definition: RtEventManagerProxy.cpp:36
RtEventManagerProxy(void)
Constructs an RtEventManagerProxy instance.
~RtEventManagerProxy(void) override
Destructs this instance and frees all resources.
RtEventManagerProxy & operator=(const RtEventManagerProxy &arg)=delete
Assignment operator.
RtEventManagerSharedData::Ptr< RtEvent > Ptr
Shared pointer type of RtEvent.
Definition: RtEvent.hpp:22
Derive from this class to inherit logging functionality.
Definition: Loggable.hxx:28
Root namespace for the PLCnext API