Added random_real
[ail.git] / ail / module.hpp
blobfaf38a32cb239e9275db8bc691f255560eb65861
1 #pragma once
3 #include <string>
4 #include <ail/environment.hpp>
5 #include <ail/windows.hpp>
7 #ifndef AIL_WINDOWS
8 #include <boost/thread/mutex.hpp>
9 #endif
11 namespace ail
13 class dynamic_module
15 public:
16 dynamic_module();
17 ~dynamic_module();
18 bool load(std::string const & new_path);
19 void unload();
20 bool get_function(std::string const & name, void * & output);
22 private:
23 bool is_loaded;
24 std::string path;
26 #ifdef AIL_WINDOWS
27 ::HMODULE module_handle;
28 #else
29 void * module_handle;
30 boost::mutex mutex;
31 #endif