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