PLCnext API Documentation 23.0.2.9
LibraryBase.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Core/ArpVersion.hpp"
9#include "Arp/System/Acf/ILibrary.hpp"
10#include "Arp/System/Acf/ComponentFactory.hpp"
11
12namespace Arp { namespace System { namespace Acf
13{
14
20class LibraryBase : public ILibrary
21{
22public: // construction/destruction
26 LibraryBase(AppDomain& appDomain, const Version& buildVersion);
28 virtual ~LibraryBase(void) = default;
29
30public: // overridden operations
32 const Version& GetBuildVersion(void)const override;
33
34private: // deleted methods
35 LibraryBase(const LibraryBase& arg) = delete;
36 LibraryBase& operator=(const LibraryBase& arg) = delete;
37
38protected: // fields
40
41private: // fields
42 const Version buildVersion;
43};
44
46// inline methods of class LibraryBase
47
49{
50 return this->buildVersion;
51}
52
54{
55 return this->componentFactory;
56}
57
58}}} // end of namesapce Arp::System::Acf
This class represents a single application domain for each process and is implemented as singleton.
Definition: AppDomain.hpp:122
This class represents the version of a special SDK or Arp build.
Definition: BasicVersion.hpp:35
This class is used by Acf libraries to provide a component factory of the library specific components...
Definition: ComponentFactory.hpp:17
This interface is used by the Acf to create components dynamiically through configuration (....
Definition: IComponentFactory.hpp:19
Any Acf Library shall implement this interface.
Definition: ILibrary.hpp:22
Any Acf Library shall derive from this base class.
Definition: LibraryBase.hpp:21
const Version & GetBuildVersion(void) const override
Gets the SDK version of the SDK used to build the shared library.
Definition: LibraryBase.hpp:48
virtual ~LibraryBase(void)=default
The default destructor.
ComponentFactory componentFactory
This field is used to register library specific component factory methods.
Definition: LibraryBase.hpp:39
LibraryBase(AppDomain &appDomain, const Version &buildVersion)
Constructs an isntance of class LibraryBase.
IComponentFactory & GetComponentFactory(void) override
Gets the component factory of this library to create instances of its provided components.
Definition: LibraryBase.hpp:53
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API