| 749 | } |
| 750 | |
| 751 | MeasureManagerServer::ResponseType MeasureManagerServer::bcl_measures([[maybe_unused]] const web::json::value& body) { |
| 752 | const bool force_reload = false; // Not supposed to mess with the BCL Measures! |
| 753 | auto& localBCL = openstudio::LocalBCL::instance(); |
| 754 | std::vector<web::json::value> result; |
| 755 | for (auto& measure : localBCL.measures()) { |
| 756 | auto measureDir = measure.directory(); |
| 757 | if (boost::optional<BCLMeasure> measure_ = m_measureManager.getMeasure(measureDir, force_reload)) { |
| 758 | result.emplace_back(toWebJSON(measure_->toJSON())); |
| 759 | } else { |
| 760 | fmt::print("Directory '{}' is not a measure\n", measureDir.generic_string()); |
| 761 | } |
| 762 | } |
| 763 | |
| 764 | return {web::http::status_codes::OK, web::json::value::array(result)}; |
| 765 | } |
| 766 | |
| 767 | MeasureManagerServer::ResponseType MeasureManagerServer::update_measures(const web::json::value& body) { |
| 768 | auto measuresDir = get_field<openstudio::path>(body, "measures_dir", my_measures_dir); |
nothing calls this directly
no test coverage detected