| 13 | namespace openstudio { |
| 14 | |
| 15 | BCLFileReference::BCLFileReference(const openstudio::path& measureRootDir, const openstudio::path& relativePath, const bool setMembers) |
| 16 | : m_measureRootDir(openstudio::filesystem::system_complete(measureRootDir)), |
| 17 | m_path(openstudio::filesystem::system_complete(measureRootDir / relativePath)) { |
| 18 | // DLM: why would you not want to set the members? |
| 19 | if (setMembers) { |
| 20 | m_checksum = openstudio::checksum(m_path); |
| 21 | |
| 22 | std::string fileType = this->fileType(); |
| 23 | if (fileType == "osm") { |
| 24 | m_softwareProgram = "OpenStudio"; |
| 25 | //m_softwareProgramVersion = ""; |
| 26 | } else if (fileType == "osc") { |
| 27 | m_softwareProgram = "OpenStudio"; |
| 28 | //m_softwareProgramVersion = ""; |
| 29 | } else if (fileType == "idf") { |
| 30 | m_softwareProgram = "EnergyPlus"; |
| 31 | //m_softwareProgramVersion = ""; |
| 32 | } else if ((fileType == "rb") || (fileType == "py")) { |
| 33 | m_softwareProgram = "OpenStudio"; |
| 34 | //m_softwareProgramVersion = ""; |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | openstudio::path BCLFileReference::path() const { |
| 40 | return m_path; |