Update to LibConf system, added loading of dynamic libraries (only Linux for now) and some more fixes.
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
#if !defined(MIJIN_UTIL_OS_HPP_INCLUDED)
|
||||
#define MIJIN_UTIL_OS_HPP_INCLUDED 1
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace mijin
|
||||
{
|
||||
|
||||
@@ -19,11 +22,23 @@ namespace mijin
|
||||
// public types
|
||||
//
|
||||
|
||||
struct LibraryHandle
|
||||
{
|
||||
void* data = nullptr;
|
||||
|
||||
constexpr operator bool() const noexcept { return data != nullptr; }
|
||||
constexpr bool operator!() const noexcept { return data == nullptr; }
|
||||
};
|
||||
|
||||
//
|
||||
// public functions
|
||||
//
|
||||
|
||||
void setCurrentThreadName(const char* threadName);
|
||||
[[nodiscard]] LibraryHandle openSharedLibrary(std::string_view libraryFile) noexcept;
|
||||
[[nodiscard]] void* loadSymbolFromLibrary(const LibraryHandle library, const char* symbolName) noexcept;
|
||||
void setCurrentThreadName(const char* threadName) noexcept;
|
||||
|
||||
[[nodiscard]] std::string makeLibraryFilename(std::string_view libraryName) noexcept;
|
||||
|
||||
} // namespace mijin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user