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

Method valueAsInteger

src/utilities/data/Variant.cpp:34–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34int Variant::valueAsInteger() const {
35 if (m_type != VariantType::Integer) {
36 LOG_AND_THROW("Variant does not hold an int");
37 }
38 return std::get<int>(m_value);
39}
40
41double Variant::valueAsDouble() const {
42 if (m_type == VariantType::Integer) {

Callers 5

Variant.cppFile · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
addComponentMethod · 0.45
addMeasureMethod · 0.45

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.36
TEST_FFunction · 0.36