17 #if defined(_WIN32) || defined(WIN32)
21 #include <string_view>
25 #include "lfilesystem/lfilesystem_Export.h"
84 #if (defined(_WIN32) || defined(WIN32)) && ! defined(DOXYGEN)
105 [[nodiscard]]
bool isOpen() const noexcept;
108 [[nodiscard]]
Handle getHandle() const noexcept;
111 [[nodiscard]]
void* findFunction (const std::string_view& functionName) noexcept;
122 bool open (const std::string_view& nameOrPath) noexcept;
150 [[nodiscard]]
File getFile() const;
153 [[nodiscard]] std::
string getName() const;
219 std::atomic<Handle> handle {
nullptr };
221 std::vector<Listener*> listeners;
223 bool suppressNotifs {
false };
237 struct LFILE_EXPORT hash<limes::files::DynamicLibrary> final
This class listens for events to a DynamicLibrary and receives a callback when the library is opened,...
virtual void libraryOpened(bool)
Called when the library is opened.
virtual ~Listener()
Destructor.
Listener(DynamicLibrary &library)
Constructs a listener.
virtual void libraryReloaded(bool)
Called when DynamicLibrary::reload() is called.
virtual void libraryClosed()
Called when the library is closed.
This class watches a dynamic library file for changes on disk.
Reloader(DynamicLibrary &libraryToReload)
Creates a Reloader object watching the specified library.
This class represents a dynamically loaded library.
DynamicLibrary()=default
Creates an unopened library object.
void * Handle
The type of platform-specific handle used for dynamic libraries.
~DynamicLibrary()
Destructor.
bool isOpen() const noexcept
Returns true if the library is currently open.
DynamicLibrary(const std::string_view &nameOrPath) noexcept
Creates a library object and attempts to open the specified library.
This class listens for changes to or operations on a certain file, and receives callbacks to be notif...
This class represents a file on the filesystem.
The base class for any kind of object on the filesystem.
This file defines the files::FileWatcher class.
This file defines the File and TempFile classes.