PLCnext API Documentation 23.6.0.37
SharedLibrary.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8
9// forwards
10namespace Arp { namespace System { namespace Ve
11{
12class ISharedLibraryService;
13}}}
14
15namespace Arp { namespace System { namespace Commons { namespace Runtime
16{
17
20{
21public: // construction/destruction
22
25
27 SharedLibrary(const SharedLibrary& arg) = delete;
28
30 SharedLibrary& operator=(const SharedLibrary& arg) = delete;
31
33 virtual ~SharedLibrary(void);
34
35public: // operations
36
44 void Load(const String& path);
45
49 void Unload(void);
50
56 void* GetFunctionAddress(const String& symbolName);
57
58public: // static operations
59 static String GetArpLibrariesDirectory(void);
60
64 static String GetFormattedPath(const String& path);
65
70 static bool ProbeLibrary(const String& path, String& probedPath);
71
72private: // fields
73 Arp::System::Ve::ISharedLibraryService* pSharedLibraryService;
74
75};
76
78// inline methods of class SharedLibrary
79
80}}}} // end of namesapce Arp::System::Commons::Runtime
High level API to enable work with dynamically loadable shared libraries.
Definition: SharedLibrary.hpp:20
void Load(const String &path)
Loads the specified shared library.
static String GetFormattedPath(const String &path)
Formats the path depending on OS.
SharedLibrary(const SharedLibrary &arg)=delete
Copy contructor.
SharedLibrary & operator=(const SharedLibrary &arg)=delete
Assignment operator.
SharedLibrary(void)
Constructs an SharedLibrary instance.
virtual ~SharedLibrary(void)
Destructs this instance and frees all resouces.
void * GetFunctionAddress(const String &symbolName)
Returns the address where specified symbol is located in the memory.
void Unload(void)
Unloads the shared library.
static bool ProbeLibrary(const String &path, String &probedPath)
Probes the library
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API