| 350 | |
| 351 | template <class T> |
| 352 | void Parser::PrintMap(const Vars::Map<T>& m, std::ostream& out) { |
| 353 | for (auto it = m.cbegin(); it != m.cend(); ++it) { |
| 354 | const std::string val = m.GetStr(it->first); |
| 355 | out << "set " << m.GetTypeName() << " " << it->first << " "; |
| 356 | if (val.find("\n") != std::string::npos) { |
| 357 | out << "\"" << val << "\n\""; |
| 358 | } else { |
| 359 | out << val; |
| 360 | } |
| 361 | out << std::endl; |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | void Parser::PrintVars(const Vars& var, std::ostream& out) { |
| 366 | PrintMap(var.String, out); |
nothing calls this directly
no test coverage detected