#ifndef LIBDYNMET_H #define LIBDYNMET_H #include #include #include #include #include class dynamicMethods { private: std::map)>> publicMethods; public: void addMethod(std::string name, std::function param)> functionPtr); void* callMethod(std::string name, std::vector param); template T callMethod(std::string name, std::vector< std::string > param) { if(this->publicMethods.find(name) == this->publicMethods.end()) { throw std::logic_error("Method " + name + " not found"); } return reinterpret_cast(this->publicMethods[name](param)); } }; #endif //LIBIMPLICANT_H