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

Method valueAsInteger

src/measure/OSArgument.cpp:171–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169 }
170
171 int OSArgument::valueAsInteger() const {
172 if (!hasValue()) {
173 LOG_AND_THROW("This argument does not have a value set.")
174 }
175 if (type() != OSArgumentType::Integer) {
176 LOG_AND_THROW("This argument is of type " << type().valueName() << ", not of type Integer.");
177 }
178
179 return std::get<int>(m_value);
180 }
181
182 std::string OSArgument::valueAsString() const {
183 if (!hasValue()) {

Callers 9

measure_hashMethod · 0.45
test_attributeMethod · 0.45
addAttributesMethod · 0.45
validateUserArgumentsMethod · 0.45
TEST_FFunction · 0.45
applyArgumentsMethod · 0.45
outputAttributesToJSONFunction · 0.45

Calls 2

valueNameMethod · 0.80
typeFunction · 0.50

Tested by 2

test_attributeMethod · 0.36
TEST_FFunction · 0.36