PLCnext API Documentation 23.6.0.37
SharedModuleLibraryLoader.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Commons/Runtime/SharedLibrary.hpp"
9
10namespace Arp { namespace System { namespace Commons { namespace Extensibility
11{
12
14
16{
17public: // construction/destruction
19 explicit SharedModuleLibraryLoader(const String& path);
30
31public: // 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
54private: // 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
SharedModuleLibraryLoader(SharedModuleLibraryLoader &&arg)=default
Move constructor.
SharedModuleLibraryLoader(const SharedModuleLibraryLoader &arg)=delete
Copy constructor.
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.
SharedLibrary & GetSharedLibrary() const
Retuns the shared library
SharedModuleLibraryLoader & operator=(SharedModuleLibraryLoader &&arg)=default
Move-assignment operator.
SharedModuleLibraryLoader(const String &path)
Constructs an SharedModuleLibraryLoader instance.
String GetFileName() const
Returns the file name of the library (without directory)
const String & GetFullPath() const
Returns the full path to the library file
SharedModuleLibraryLoader & operator=(const SharedModuleLibraryLoader &arg)=delete
Copy-assignment operator.
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