MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / getOptionalIntegerArgumentValue

Method getOptionalIntegerArgumentValue

src/measure/OSRunner.cpp:704–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

702 }
703
704 boost::optional<int> OSRunner::getOptionalIntegerArgumentValue(const std::string& argument_name,
705 const std::map<std::string, OSArgument>& user_arguments) {
706 auto it = user_arguments.find(argument_name);
707 if (it != user_arguments.end()) {
708 if (it->second.hasValue()) {
709 return it->second.valueAsInteger();
710 } else if (it->second.hasDefaultValue()) {
711 return it->second.defaultValueAsInteger();
712 }
713 }
714
715 return boost::none;
716 }
717
718 std::string OSRunner::getStringArgumentValue(const std::string& argument_name, const std::map<std::string, OSArgument>& user_arguments) {
719 std::stringstream ss;

Callers

nothing calls this directly

Calls 6

hasDefaultValueMethod · 0.80
defaultValueAsIntegerMethod · 0.80
findMethod · 0.45
endMethod · 0.45
hasValueMethod · 0.45
valueAsIntegerMethod · 0.45

Tested by

no test coverage detected