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

Method getMeasureStepsWithIndex

src/utilities/filetypes/WorkflowJSON.cpp:713–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711 }
712
713 std::vector<std::pair<unsigned, MeasureStep>> WorkflowJSON_Impl::getMeasureStepsWithIndex(const MeasureType& measureType) const {
714 std::vector<std::pair<unsigned, MeasureStep>> result;
715 size_t n = m_steps.size();
716 OS_ASSERT(m_measureTypes.size() == n);
717 for (size_t i = 0; i < n; ++i) {
718 if (m_steps[i].optionalCast<MeasureStep>()) {
719 if (m_measureTypes[i] == measureType.value()) {
720 result.emplace_back(i, m_steps[i].cast<MeasureStep>());
721 }
722 }
723 }
724 return result;
725 }
726
727 bool WorkflowJSON_Impl::setMeasureSteps(const MeasureType& measureType, const std::vector<MeasureStep>& steps) {
728

Callers 1

applyMeasuresMethod · 0.80

Calls 2

sizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected