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

Method environmentType

src/utilities/sql/SqlFile_Impl.cpp:1169–1181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1167 };
1168
1169 boost::optional<EnvironmentType> SqlFile_Impl::environmentType(const std::string& envPeriod) const {
1170 boost::optional<EnvironmentType> result;
1171 std::string query = "SELECT EnvironmentType FROM environmentperiods WHERE EnvironmentName=? COLLATE NOCASE";
1172 boost::optional<int> temp = execAndReturnFirstInt(query, envPeriod);
1173 if (temp) {
1174 try {
1175 result = EnvironmentType(*temp);
1176 } catch (...) {
1177 LOG(Error, "Could not convert integer value " << *temp << " to EnvironmentType");
1178 }
1179 }
1180 return result;
1181 }
1182
1183 OptionalDouble SqlFile_Impl::economicsEnergyCost() const {
1184 return execAndReturnFirstDouble(

Callers

nothing calls this directly

Calls 1

execAndReturnFirstIntFunction · 0.70

Tested by

no test coverage detected