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

Method illuminanceMapNames

src/utilities/sql/SqlFile_Impl.cpp:3647–3668  ·  view source on GitHub ↗

get names of all available illuminance maps

Source from the content-addressed store, hash-verified

3645
3646 /// get names of all available illuminance maps
3647 std::vector<std::string> SqlFile_Impl::illuminanceMapNames() const {
3648 std::vector<std::string> names;
3649
3650 const std::string& s = "select MapName from daylightmaps";
3651
3652 sqlite3_stmt* sqlStmtPtr;
3653
3654 int code = sqlite3_prepare_v2(m_db, s.c_str(), -1, &sqlStmtPtr, nullptr);
3655 code = sqlite3_step(sqlStmtPtr);
3656
3657 while (code == SQLITE_ROW) {
3658 names.push_back(columnText(sqlite3_column_text(sqlStmtPtr, 0)));
3659
3660 // step to next row
3661 code = sqlite3_step(sqlStmtPtr);
3662 }
3663
3664 /// must finalize to prevent memory leaks
3665 sqlite3_finalize(sqlStmtPtr);
3666
3667 return names;
3668 }
3669
3670 /// get names of all available illuminance maps for the given environment period
3671 std::vector<std::string> SqlFile_Impl::illuminanceMapNames(const std::string& envPeriod) const {

Callers

nothing calls this directly

Calls 4

columnTextFunction · 0.70
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected