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

Method getOptionalStringArgumentValue

src/measure/OSRunner.cpp:739–751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737 }
738
739 boost::optional<std::string> OSRunner::getOptionalStringArgumentValue(const std::string& argument_name,
740 const std::map<std::string, OSArgument>& user_arguments) {
741 auto it = user_arguments.find(argument_name);
742 if (it != user_arguments.end()) {
743 if (it->second.hasValue()) {
744 return it->second.valueAsString();
745 } else if (it->second.hasDefaultValue()) {
746 return it->second.defaultValueAsString();
747 }
748 }
749
750 return boost::none;
751 }
752
753 openstudio::path OSRunner::getPathArgumentValue(const std::string& argument_name, const std::map<std::string, OSArgument>& user_arguments) {
754 std::stringstream ss;

Callers

nothing calls this directly

Calls 6

hasDefaultValueMethod · 0.80
defaultValueAsStringMethod · 0.80
findMethod · 0.45
endMethod · 0.45
hasValueMethod · 0.45
valueAsStringMethod · 0.45

Tested by

no test coverage detected