MCPcopy Create free account
hub / github.com/cselab/aphros / PrintMap

Method PrintMap

src/parse/parser.cpp:352–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350
351template <class T>
352void 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
365void Parser::PrintVars(const Vars& var, std::ostream& out) {
366 PrintMap(var.String, out);

Callers

nothing calls this directly

Calls 5

GetTypeNameMethod · 0.80
cbeginMethod · 0.45
cendMethod · 0.45
GetStrMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected