7 #ifndef NAZARA_DYNLIB_HPP 8 #define NAZARA_DYNLIB_HPP 10 #include <Nazara/Prerequesites.hpp> 11 #include <Nazara/Core/MovablePtr.hpp> 12 #include <Nazara/Core/String.hpp> 14 #if defined(NAZARA_PLATFORM_WINDOWS) 15 #define NAZARA_DYNLIB_EXTENSION ".dll" 16 #elif defined(NAZARA_PLATFORM_LINUX) 17 #define NAZARA_DYNLIB_EXTENSION ".so" 18 #elif defined(NAZARA_PLATFORM_MACOSX) 19 #define NAZARA_DYNLIB_EXTENSION ".dynlib" 24 #if NAZARA_CORE_THREADSAFE && NAZARA_THREADSAFETY_DYNLIB 25 #include <Nazara/Core/ThreadSafety.hpp> 27 #include <Nazara/Core/ThreadSafetyOff.hpp> 32 using DynLibFunc = int (*)();
44 String GetLastError()
const;
45 DynLibFunc GetSymbol(
const String& symbol)
const;
47 bool IsLoaded()
const;
49 bool Load(
const String& libraryPath);
56 NazaraMutexAttrib(m_mutex,
mutable)
58 mutable String m_lastError;
63 #endif // NAZARA_DYNLIB_HPP TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Core class that represents a string.
Definition: String.hpp:22
Core class that represents a dynamic library loader.
Definition: DynLib.hpp:36