#pragma once #include "include.h" #include #include #include #include "begin_code.h" class SharedLibrary { public: SharedLibrary(); SharedLibrary(const std::string& Filename); ~SharedLibrary()=default; int load(const std::string& Filename); int unload(); template std::function get(const std::string& FunctionName) { return std::function(reinterpret_cast(get(FunctionName))); } void* get(const std::string& FunctionName) const; void release(); private: void* _get() const; void _set(void*); void _clear(); std::shared_ptr _obj; }; #include "end_code.h"