MCPcopy Create free account
hub / github.com/OpenMC2/OpenMC2 / get_value

Method get_value

src/Settings.cpp:58–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 typedef boost::property_tree::customize_stream<Ch, Traits, B> customizeB;
57
58 inline boost::optional<external_type> get_value(const internal_type &v) const {
59 std::basic_istringstream<Ch, Traits, Alloc> stream(v);
60 external_type value;
61 customizeA::extract(stream, value.first);
62 customizeB::extract(stream, value.second);
63 if (stream.fail() || stream.bad() || stream.get() != Traits::eof()) return { };
64 return value;
65 }
66 inline boost::optional<internal_type> put_value(const external_type &v) const {
67 std::basic_ostringstream<Ch, Traits, Alloc> stream;
68 customizeA::insert(stream, v.first);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected