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

Method data

src/utilities/filetypes/EpwFile.cpp:2739–2759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2737}
2738
2739std::vector<EpwDataPoint> EpwFile::data() {
2740 if (m_data.empty()) {
2741 if (!openstudio::filesystem::exists(m_path) || !openstudio::filesystem::is_regular_file(m_path)) {
2742 LOG_AND_THROW("Path '" << m_path << "' is not an EPW file");
2743 }
2744
2745 // set checksum
2746 m_checksum = openstudio::checksum(m_path);
2747
2748 // open file
2749 std::ifstream ifs(openstudio::toSystemFilename(m_path));
2750
2751 if (!parse(ifs, true)) {
2752 ifs.close();
2753 LOG(Error, "EpwFile '" << toString(m_path) << "' cannot be processed");
2754 } else {
2755 ifs.close();
2756 }
2757 }
2758 return m_data;
2759}
2760
2761std::string EpwDesignCondition::titleOfDesignCondition() const {
2762 return m_titleOfDesignCondition;

Callers 1

TESTFunction · 0.45

Calls 5

toSystemFilenameFunction · 0.85
checksumFunction · 0.50
toStringFunction · 0.50
emptyMethod · 0.45
closeMethod · 0.45

Tested by 1

TESTFunction · 0.36