#include "index.hpp" #include "Dummy.hpp" #include "FlatSurroundingBox.hpp" #include "FlatDualMC.hpp" namespace contouring { int idxByName(const std::string& name) { for (size_t i = 0; i < names.size(); i++) { if(name == names[i]) return (int)i; } return 0; } std::shared_ptr load(int idx, const std::map& data) { switch (idx) { case 2: return std::make_shared(); case 1: return std::make_shared(data.at(names[1])); default: return std::make_shared(data.at(names[0])); } } void save(int idx, std::shared_ptr& ct, std::map& data) { data.insert_or_assign(names[idx], ct->getOptions()); } }