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

Method BCLFileReference

src/utilities/bcl/BCLFileReference.cpp:15–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace openstudio {
14
15BCLFileReference::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
39openstudio::path BCLFileReference::path() const {
40 return m_path;

Callers

nothing calls this directly

Calls 2

fileTypeMethod · 0.95
checksumFunction · 0.50

Tested by

no test coverage detected