PLCnext API Documentation  22.9.0.33
ILibrary.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Core/AppDomain.hpp"
9 
10 namespace Arp { namespace System { namespace Acf
11 {
12 
13 //forwards
14 class IComponentFactory;
15 
21 class ILibrary
22 {
23 public: // typedefs
25  typedef ILibrary* Ptr;
26 
27 public: // prototyping of library entry point
33  typedef ILibrary& (*MainEntry)(AppDomain& appDomain);
34 
35 protected: // prototyping of library auxiliary operation
38  typedef void (*Main)(AppDomain& appDomain);
39 
40 public: // construction/destruction
42  ILibrary(void) = default;
44  virtual ~ILibrary(void) = default;
45 
46 public: // abstract operations
50 
52  virtual const Version& GetBuildVersion(void)const = 0;
53 
54 private: // deleted methods to avoid copying
55  ILibrary(const ILibrary& arg) = delete;
56  ILibrary& operator=(const ILibrary& arg) = delete;
57 };
58 
60 // inline methods of class ILibrary
61 
62 }}} // 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 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
virtual IComponentFactory & GetComponentFactory(void)=0
Gets the component factory of this library to create instances of its provided components.
void(* Main)(AppDomain &appDomain)
This is the prototype of the (static) entry point or auxiliary operation of any library class.
Definition: ILibrary.hpp:38
virtual const Version & GetBuildVersion(void) const =0
Gets the SDK version of the SDK used to build the shared library.
ILibrary * Ptr
The pointer type of this interface.
Definition: ILibrary.hpp:25
ILibrary(void)=default
The default constructor.
virtual ~ILibrary(void)=default
The default destructor.
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API