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

Function translateIdfToEPJSONWithOS

src/epjson/test/epJSONFixture.cpp:164–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164Json::Value translateIdfToEPJSONWithOS(const openstudio::path& location) {
165 auto idf = openstudio::IdfFile::load(location);
166
167 if (!idf) {
168 return Json::Value{};
169 }
170
171 auto result = openstudio::epJSON::toJSON(*idf);
172
173 const auto outputLocation = location.parent_path() / openstudio::toPath("os.epJSON");
174 std::ofstream ofs(openstudio::toString(outputLocation), std::ofstream::trunc);
175 ofs << result.toStyledString() << '\n';
176 return result;
177}
178
179std::pair<Json::Value, Json::Value> epJSONFixture::doEPJSONTranslations(const std::string& idfname) {
180

Callers 1

doEPJSONTranslationsMethod · 0.85

Calls 3

toJSONFunction · 0.85
toPathFunction · 0.50
toStringFunction · 0.50

Tested by

no test coverage detected