PLCnext API Documentation 25.0.2.69
ComponentBase.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Acf/Commons/ILibrary.hpp"
9#include "Arp/Base/Acf/Commons/IComponent.hpp"
10
11namespace Arp::Base::Acf::Commons
12{
13
19class ARP_EXPORT ComponentBase : public IComponent
20{
21public: // Impl forward declaration
22 class Impl;
23
24protected: // construction/destruction/assignment
25 ComponentBase(ILibrary& library, const String& fullName, ComponentCategory category, uint32 startOrder);
26
27public: // construction/destruction/assignment
28 ComponentBase(const ComponentBase& arg) = delete;
30 ComponentBase& operator=(const ComponentBase& arg) = delete;
32 ~ComponentBase(void)override;
33
34public: // static operations
35 static uint32 GetDefaultStartOrder(void);
36
37public: // setter/getter operations
38 Application& GetApplication(void)const final;
39 ILibrary& GetLibrary(void)const final;
40 String GetFullName(void)const final;
41 ComponentCategory GetComponentCategory(void)const final;
42 uint32 GetStartOrder(void)const final;
43 bool IsRequired(void)const override;
44 String GetComponentInfoItem(ComponentInfoKind kind) const override;
45
46public: // IComponent operations
47 void Initialize(void)override;
48 void LoadSettings(const String& settingsPath)override;
49 void SetupSettings(void)override;
50 void SubscribeServices(void)override;
51 void PublishServices(void)override;
52 void LoadConfig(void)override;
53 void SetupConfig(void)override;
54 void ResetConfig(void)override;
55 void Dispose(void)override;
56 void PowerDown(void)override;
57
58public: // internal operations
59 Impl& GetImpl(void);
60 const Impl& GetImpl(void)const;
61
62private: // Impl usings
63 using Pimpl = PimplPtr<Impl>;
64
65private: // Impl fields
66 Pimpl pimpl;
67};
68
69} // end of namespace Arp::Base::Acf::Commons
70
72{
74}
This class provides some system functionality and infos.
Definition: Application.hpp:17
Use this class as base class of all Acf components.
Definition: ComponentBase.hpp:20
~ComponentBase(void) override
The default destructor.
ComponentBase(ComponentBase &&arg) noexcept
The default move constructor.
ComponentBase & operator=(ComponentBase &&arg) noexcept
The default move-assignment operator.
This is the most important basic interface of the Arp platform. Any component shall implement this in...
Definition: IComponent.hpp:79
Any Acf Library shall implement this interface.
Definition: ILibrary.hpp:20
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::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:33
This is the namespace of the Application Component Framework.
Definition: ComponentBase.hpp:72