// Author: Andreas F. Borchert // Description: test of function registry #include #include "DynFunctionRegistry.hpp" using namespace std; int main() { DynFunctionRegistry registry("."); string fname; double x; while (cout << ": " && cin >> fname >> x) { if (registry.is_known(fname)) { Function* f = registry.get_function(fname); cout << f->execute(x) << endl; } else { cout << "Unknown function name: " << fname << endl; } } } // main