#ifndef MANDEL_CALCPLUGIN_H #define MANDEL_CALCPLUGIN_H #include #if defined(__GNUC__) #define MANDEL_EXPORT __attribute__((visibility("default"))) #define MANDEL_IMPORT #elif defined(_MSC_VER) #define MANDEL_EXPORT __declspec(dllexport) #define MANDEL_IMPORT __declspec(dllimport) #else #define MANDEL_EXPORT #define MANDEL_IMPORT #endif namespace mnd { class CalcPlugin; class MandelGenerator; } class MANDEL_EXPORT mnd::CalcPlugin { void* handle; public: CalcPlugin(const std::string& path); CalcPlugin(const CalcPlugin&) = delete; CalcPlugin(CalcPlugin&&) = default; ~CalcPlugin(void); CalcPlugin& operator=(const CalcPlugin&) = delete; CalcPlugin& operator=(CalcPlugin&&) = default; /// /// \brief gets the generators provided by this plugin /// \return a vector containing the generators provided by this /// plugin. If no plugin was loaded, the vector is empty. /// /// \note The returned generators (vector incl.) have the same lifetime as /// the plugin i.e. they are no longer valid should the plugin /// struct be destroyed. /// const std::vector& getGenerators(void); inline bool isValid(void) const { return handle != nullptr; } }; #endif // MANDEL_CALCPLUGIN