PLCnext API Documentation  22.9.0.33
SharedModuleLibraryLoader.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Commons/Runtime/SharedLibrary.hpp"
9 
10 namespace Arp { namespace System { namespace Commons { namespace Extensibility
11 {
12 
14 
16 {
17 public: // construction/destruction
19  explicit SharedModuleLibraryLoader(const String& path);
30 
31 public: // operations
33  const String& GetFullPath() const;
34 
37 
39  bool Exists() const;
40 
42  bool IsLoaded() const;
43 
45  void Load();
46 
48  void Unload();
49 
53 
54 private: // fields
55  String path;
56  std::unique_ptr<SharedLibrary> library;
57 
58 };
59 
61 // inline methods of class SharedModuleLibraryLoader
62 
63 }}}} // end of namespace Arp::System::Commons::Extensibility
Definition: SharedModuleLibraryLoader.hpp:16
SharedLibrary & GetSharedLibrary() const
Retuns the shared library
SharedModuleLibraryLoader(SharedModuleLibraryLoader &&arg)=default
Move constructor.
SharedModuleLibraryLoader & operator=(SharedModuleLibraryLoader &&arg)=default
Move-assignment operator.
SharedModuleLibraryLoader(const SharedModuleLibraryLoader &arg)=delete
Copy constructor.
SharedModuleLibraryLoader & operator=(const SharedModuleLibraryLoader &arg)=delete
Copy-assignment operator.
const String & GetFullPath() const
Returns the full path to the library file
bool Exists() const
Returns true if the library file exists.
bool IsLoaded() const
Returns true if the library is loaded
~SharedModuleLibraryLoader(void)
Destructs this instance and frees all resources.
SharedModuleLibraryLoader(const String &path)
Constructs an SharedModuleLibraryLoader instance.
String GetFileName() const
Returns the file name of the library (without directory)
High level API to enable work with dynamically loadable shared libraries.
Definition: SharedLibrary.hpp:20
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API