void TeamSelector::saveTeams(const QString& filename) { std::vector<Team> _teams; _teams.reserve(teams.size()); for(size_t i = 0; i < teams.size(); ++i) _teams.push_back(*teams[i]); ConfigMap cm; Team::writeTeams(cm, _teams); std::string fn = toString(filename); cm.write(&fn); }
bool ColorTableCreator::saveTrainingData(string fileName) const { ConfigMap cm; cm["handMadeClassification"] << handMadeClassification; ofstream of; of.open(fileName.c_str()); if(!of.is_open()) return false; cm.write(of); of.close(); return true; }