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

Method set

src/cli/MeasureManager.cpp:710–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

708}
709
710MeasureManagerServer::ResponseType MeasureManagerServer::set(const web::json::value& body) {
711 if (auto p_ = get_field<openstudio::path>(body, "my_measures_dir")) {
712 if (!openstudio::filesystem::is_directory(*p_)) {
713 // Issue an error message
714 return {web::http::status_codes::BadRequest,
715 toWebJSON(fmt::format("Error, my_measures_dir '{}' is a not a valid directory", p_->generic_string()))};
716 }
717 this->my_measures_dir = std::move(*p_);
718 return {web::http::status_codes::OK, web::json::value()};
719 } else {
720 return {web::http::status_codes::BadRequest, toWebJSON("Missing the my_measures_dir in the post data")};
721 }
722}
723
724MeasureManagerServer::ResponseType MeasureManagerServer::download_bcl_measure(const web::json::value& body) { // NOLINT
725 if (auto uid_ = get_field<std::string>(body, "uid")) {

Callers 15

mFunction · 0.80
OtFunction · 0.80
ZtFunction · 0.80
rFunction · 0.80
KiFunction · 0.80
joFunction · 0.80
d3.min.jsFile · 0.80
nFunction · 0.80
jquery.min.jsFile · 0.80
PFunction · 0.80
dtFunction · 0.80
gtFunction · 0.80

Calls 2

toWebJSONFunction · 0.85
valueFunction · 0.50

Tested by 1

test_OptionalMethod · 0.64