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

Method getOptionalDoubleArgumentValue

src/measure/OSRunner.cpp:669–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

667 }
668
669 boost::optional<double> OSRunner::getOptionalDoubleArgumentValue(const std::string& argument_name,
670 const std::map<std::string, OSArgument>& user_arguments) {
671 auto it = user_arguments.find(argument_name);
672 if (it != user_arguments.end()) {
673 if (it->second.hasValue()) {
674 return it->second.valueAsDouble();
675 } else if (it->second.hasDefaultValue()) {
676 return it->second.defaultValueAsDouble();
677 }
678 }
679
680 return boost::none;
681 }
682
683 int OSRunner::getIntegerArgumentValue(const std::string& argument_name, const std::map<std::string, OSArgument>& user_arguments) {
684 std::stringstream ss;

Callers

nothing calls this directly

Calls 6

hasDefaultValueMethod · 0.80
defaultValueAsDoubleMethod · 0.80
findMethod · 0.45
endMethod · 0.45
hasValueMethod · 0.45
valueAsDoubleMethod · 0.45

Tested by

no test coverage detected