MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / ToStringVisitor

Class ToStringVisitor

framework/configfile.cpp:67–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 std::map<UString, ModifiedOptionT> modifiedOptions;
66
67 struct ToStringVisitor
68 {
69 using result_type = UString;
70 UString operator()(const int &operand) const { return Strings::fromInteger(operand); }
71 UString operator()(const float &operand) const { return Strings::fromFloat(operand); }
72 UString operator()(const bool &operand) const { return operand ? "1" : "0"; }
73 UString operator()(const UString &str) const { return str; }
74 };
75
76 public:
77 ConfigFileImpl() : parsed(false), programName("program") {}

Callers 1

saveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected