src/model/ExternalFile.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "ExternalFile.hpp" | ||
| 7 | #include "ExternalFile_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Model.hpp" | ||
| 10 | #include "ScheduleFile.hpp" | ||
| 11 | #include "PythonPluginInstance.hpp" | ||
| 12 | #include "PythonPluginInstance_Impl.hpp" | ||
| 13 | #include "ChillerElectricASHRAE205.hpp" | ||
| 14 | #include "ChillerElectricASHRAE205_Impl.hpp" | ||
| 15 | |||
| 16 | #include <utilities/idd/IddFactory.hxx> | ||
| 17 | #include <utilities/idd/IddEnums.hxx> | ||
| 18 | #include <utilities/idd/OS_External_File_FieldEnums.hxx> | ||
| 19 | |||
| 20 | #include "../utilities/filetypes/WorkflowJSON.hpp" | ||
| 21 | #include "../utilities/core/PathHelpers.hpp" | ||
| 22 | #include "../utilities/core/Checksum.hpp" | ||
| 23 | #include "../utilities/core/Assert.hpp" | ||
| 24 | |||
| 25 | #include <unordered_map> | ||
| 26 | #include "ScheduleFile_Impl.hpp" | ||
| 27 | |||
| 28 | namespace openstudio { | ||
| 29 | namespace model { | ||
| 30 | |||
| 31 | namespace detail { | ||
| 32 | |||
| 33 | 27 | ExternalFile_Impl::ExternalFile_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 34 | 27 | : ResourceObject_Impl(idfObject, model, keepHandle) { | |
| 35 |
4/6✓ Branch 1 taken 27 times.
✓ Branch 4 taken 27 times.
✓ Branch 7 taken 27 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 27 times.
✗ Branch 13 not taken.
|
27 | OS_ASSERT(idfObject.iddObject().type() == ExternalFile::iddObjectType()); |
| 36 | 27 | } | |
| 37 | |||
| 38 | ✗ | ExternalFile_Impl::ExternalFile_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle) | |
| 39 | ✗ | : ResourceObject_Impl(other, model, keepHandle) { | |
| 40 | ✗ | OS_ASSERT(other.iddObject().type() == ExternalFile::iddObjectType()); | |
| 41 | ✗ | } | |
| 42 | |||
| 43 | 16 | ExternalFile_Impl::ExternalFile_Impl(const ExternalFile_Impl& other, Model_Impl* model, bool keepHandle) | |
| 44 | 16 | : ResourceObject_Impl(other, model, keepHandle) {} | |
| 45 | |||
| 46 | ✗ | const std::vector<std::string>& ExternalFile_Impl::outputVariableNames() const { | |
| 47 | ✗ | static const std::vector<std::string> result; | |
| 48 | ✗ | if (result.empty()) { | |
| 49 | } | ||
| 50 | ✗ | return result; | |
| 51 | } | ||
| 52 | |||
| 53 | ✗ | IddObjectType ExternalFile_Impl::iddObjectType() const { | |
| 54 | ✗ | return ExternalFile::iddObjectType(); | |
| 55 | } | ||
| 56 | |||
| 57 | ✗ | ModelObject ExternalFile_Impl::clone(Model model) const { | |
| 58 | ✗ | boost::optional<ExternalFile> externalFile = ExternalFile::getExternalFile(model, toString(this->filePath())); | |
| 59 | ✗ | if (!externalFile) { | |
| 60 | ✗ | LOG_AND_THROW("Could not clone " << this->briefDescription()); | |
| 61 | } | ||
| 62 | ✗ | return *externalFile; | |
| 63 | ✗ | } | |
| 64 | |||
| 65 | 9 | std::vector<IdfObject> ExternalFile_Impl::remove() { | |
| 66 |
3/3✓ Branch 1 taken 9 times.
✓ Branch 5 taken 6 times.
✓ Branch 6 taken 3 times.
|
9 | if (!fileName().empty()) { |
| 67 |
1/1✓ Branch 1 taken 6 times.
|
6 | path p = filePath(); |
| 68 |
3/3✓ Branch 1 taken 6 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 2 times.
|
6 | if (exists(p)) { |
| 69 | try { | ||
| 70 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::filesystem::remove(p); |
| 71 | ✗ | } catch (std::exception&) { | |
| 72 | ✗ | LOG(Warn, "Could not remove file \"" << p << "\""); | |
| 73 | ✗ | } | |
| 74 | } | ||
| 75 | 6 | } | |
| 76 | |||
| 77 | 9 | std::vector<openstudio::IdfObject> tmp; | |
| 78 | |||
| 79 | // ScheduleFile | ||
| 80 |
1/1✓ Branch 1 taken 9 times.
|
9 | std::vector<ScheduleFile> sfs = scheduleFiles(); |
| 81 |
2/2✓ Branch 5 taken 4 times.
✓ Branch 6 taken 9 times.
|
13 | for (auto& scheduleFile : sfs) { |
| 82 |
1/1✓ Branch 1 taken 4 times.
|
4 | std::vector<openstudio::IdfObject> tmp2 = scheduleFile.remove(); |
| 83 |
1/1✓ Branch 5 taken 4 times.
|
4 | tmp.insert(tmp.end(), tmp2.begin(), tmp2.end()); |
| 84 | 4 | } | |
| 85 | |||
| 86 | // PythonPluginInstance | ||
| 87 |
1/1✓ Branch 1 taken 9 times.
|
9 | std::vector<PythonPluginInstance> ppis = pythonPluginInstances(); |
| 88 |
2/2✓ Branch 5 taken 1 time.
✓ Branch 6 taken 9 times.
|
10 | for (auto& pythonPluginInstance : ppis) { |
| 89 |
1/1✓ Branch 1 taken 1 time.
|
1 | std::vector<openstudio::IdfObject> tmp2 = pythonPluginInstance.remove(); |
| 90 |
1/1✓ Branch 5 taken 1 time.
|
1 | tmp.insert(tmp.end(), tmp2.begin(), tmp2.end()); |
| 91 | 1 | } | |
| 92 | |||
| 93 | // ChillerElectricASHRAE205 | ||
| 94 |
1/1✓ Branch 1 taken 9 times.
|
9 | std::vector<ChillerElectricASHRAE205> chs = chillerElectricASHRAE205s(); |
| 95 |
2/2✓ Branch 5 taken 1 time.
✓ Branch 6 taken 9 times.
|
10 | for (auto& ch : chs) { |
| 96 |
1/1✓ Branch 1 taken 1 time.
|
1 | std::vector<openstudio::IdfObject> tmp2 = ch.remove(); |
| 97 |
1/1✓ Branch 5 taken 1 time.
|
1 | tmp.insert(tmp.end(), tmp2.begin(), tmp2.end()); |
| 98 | 1 | } | |
| 99 | |||
| 100 |
1/1✓ Branch 1 taken 9 times.
|
9 | std::vector<openstudio::IdfObject> idfObjects = ModelObject_Impl::remove(); |
| 101 |
1/1✓ Branch 5 taken 9 times.
|
9 | idfObjects.insert(idfObjects.end(), tmp.begin(), tmp.end()); |
| 102 | |||
| 103 | 18 | return idfObjects; | |
| 104 | 9 | } | |
| 105 | |||
| 106 | 150 | std::string ExternalFile_Impl::fileName() const { | |
| 107 |
1/1✓ Branch 1 taken 150 times.
|
150 | boost::optional<std::string> value = getString(OS_External_FileFields::FileName, true); |
| 108 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 150 times.
✗ Branch 4 not taken.
|
150 | OS_ASSERT(value); |
| 109 |
2/2✓ Branch 1 taken 150 times.
✓ Branch 4 taken 150 times.
|
300 | return value.get(); |
| 110 | 150 | } | |
| 111 | |||
| 112 | 96 | path ExternalFile_Impl::filePath() const { | |
| 113 | 96 | path result; | |
| 114 |
2/2✓ Branch 1 taken 96 times.
✓ Branch 4 taken 96 times.
|
96 | path fname = toPath(fileName()); |
| 115 |
3/3✓ Branch 1 taken 96 times.
✓ Branch 3 taken 9 times.
✓ Branch 4 taken 87 times.
|
96 | if (openstudio::filesystem::is_regular_file(fname)) { |
| 116 | 9 | return fname; | |
| 117 | } | ||
| 118 |
3/3✓ Branch 1 taken 87 times.
✓ Branch 4 taken 87 times.
✓ Branch 7 taken 87 times.
|
87 | std::vector<path> absoluteFilePaths = this->model().workflowJSON().absoluteFilePaths(); |
| 119 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 87 times.
|
87 | if (absoluteFilePaths.empty()) { |
| 120 | ✗ | result = this->model().workflowJSON().absoluteRootDir() / fname; | |
| 121 | } else { | ||
| 122 | // Loop to find the file in all possible directories in order of preference | ||
| 123 | // (eg goes to hardcoded paths, then potentially generated_files, then files, etc.) | ||
| 124 |
2/2✓ Branch 5 taken 99 times.
✓ Branch 6 taken 3 times.
|
102 | for (const openstudio::path& dirpath : absoluteFilePaths) { |
| 125 |
1/1✓ Branch 1 taken 99 times.
|
198 | path p = dirpath / fname; |
| 126 |
3/3✓ Branch 1 taken 99 times.
✓ Branch 3 taken 84 times.
✓ Branch 4 taken 15 times.
|
99 | if (openstudio::filesystem::is_regular_file(p)) { |
| 127 |
1/1✓ Branch 1 taken 84 times.
|
84 | result = p; |
| 128 | 84 | break; | |
| 129 | } | ||
| 130 | 99 | } | |
| 131 | } | ||
| 132 | 87 | return result; | |
| 133 | 96 | } | |
| 134 | |||
| 135 | //boost::optional<std::string> ExternalFile_Impl::columnSeparator() const { | ||
| 136 | // return getString(OS_External_FileFields::ColumnSeparator,true); | ||
| 137 | //} | ||
| 138 | |||
| 139 | //char ExternalFile_Impl::columnSeparatorChar() const { | ||
| 140 | // static std::unordered_map<std::string, char> lookup({ { "Comma", ',' }, { "Tab", '\t' }, { "Fixed", ' ' }, { "Semicolon", ';' } }); | ||
| 141 | // boost::optional<std::string> value = getString(OS_External_FileFields::ColumnSeparator, true); | ||
| 142 | // OS_ASSERT(value); | ||
| 143 | // auto it = lookup.find(value.get()); | ||
| 144 | // if (it == std::end(lookup)) { | ||
| 145 | // // Invalid separator | ||
| 146 | // return '\0'; | ||
| 147 | // } | ||
| 148 | // return it->second; | ||
| 149 | //} | ||
| 150 | |||
| 151 | //bool ExternalFile_Impl::isColumnSeparatorDefaulted() const { | ||
| 152 | // return isEmpty(OS_External_FileFields::ColumnSeparator); | ||
| 153 | //} | ||
| 154 | |||
| 155 | 24 | bool ExternalFile_Impl::setFileName(const std::string& fileName) { | |
| 156 | 24 | bool result = setString(OS_External_FileFields::FileName, fileName); | |
| 157 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 24 times.
|
24 | OS_ASSERT(result); |
| 158 | 24 | return result; | |
| 159 | } | ||
| 160 | |||
| 161 | //bool ExternalFile_Impl::setColumnSeparator(const std::string& columnSeparator) { | ||
| 162 | // bool result = setString(OS_External_FileFields::ColumnSeparator, columnSeparator); | ||
| 163 | // return result; | ||
| 164 | //} | ||
| 165 | |||
| 166 | //void ExternalFile_Impl::resetColumnSeparator() { | ||
| 167 | // bool result = setString(OS_External_FileFields::ColumnSeparator, ""); | ||
| 168 | // OS_ASSERT(result); | ||
| 169 | //} | ||
| 170 | |||
| 171 | 27 | std::vector<ScheduleFile> ExternalFile_Impl::scheduleFiles() const { | |
| 172 |
2/2✓ Branch 1 taken 27 times.
✓ Branch 4 taken 27 times.
|
27 | std::vector<ScheduleFile> result = getObject<ExternalFile>().getModelObjectSources<ScheduleFile>(); |
| 173 | 27 | return result; | |
| 174 | } | ||
| 175 | |||
| 176 | 14 | std::vector<PythonPluginInstance> ExternalFile_Impl::pythonPluginInstances() const { | |
| 177 |
2/2✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
|
14 | std::vector<PythonPluginInstance> result = getObject<ExternalFile>().getModelObjectSources<PythonPluginInstance>(); |
| 178 | 14 | return result; | |
| 179 | } | ||
| 180 | |||
| 181 | 15 | std::vector<ChillerElectricASHRAE205> ExternalFile_Impl::chillerElectricASHRAE205s() const { | |
| 182 |
2/2✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
|
15 | std::vector<ChillerElectricASHRAE205> result = getObject<ExternalFile>().getModelObjectSources<ChillerElectricASHRAE205>(); |
| 183 | 15 | return result; | |
| 184 | } | ||
| 185 | |||
| 186 | } // namespace detail | ||
| 187 | |||
| 188 | 31 | boost::optional<ExternalFile> ExternalFile::getExternalFile(const Model& model, const std::string& filename, bool copyFile) { | |
| 189 |
1/1✓ Branch 1 taken 31 times.
|
31 | path p = toPath(filename); |
| 190 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 31 times.
|
31 | if (!p.has_filename()) { |
| 191 | ✗ | return boost::none; | |
| 192 | } | ||
| 193 | 31 | std::string s; | |
| 194 |
2/2✓ Branch 0 taken 27 times.
✓ Branch 1 taken 4 times.
|
31 | if (copyFile) { |
| 195 |
1/1✓ Branch 1 taken 27 times.
|
27 | s = toString(p.filename()); |
| 196 | } else { | ||
| 197 |
1/1✓ Branch 1 taken 4 times.
|
4 | s = filename; |
| 198 | } | ||
| 199 | |||
| 200 | // this factory method will give us better control if we start doing things like copying files | ||
| 201 |
3/3✓ Branch 1 taken 31 times.
✓ Branch 8 taken 12 times.
✓ Branch 9 taken 27 times.
|
39 | for (const auto& externalFile : model.getConcreteModelObjects<ExternalFile>()) { |
| 202 | |||
| 203 | // handle Windows filename case insensitivity? | ||
| 204 |
3/3✓ Branch 1 taken 12 times.
✓ Branch 5 taken 4 times.
✓ Branch 6 taken 8 times.
|
12 | if (externalFile.fileName() == s) { |
| 205 |
1/1✓ Branch 1 taken 4 times.
|
4 | return externalFile; |
| 206 | } | ||
| 207 | 31 | } | |
| 208 | |||
| 209 | try { | ||
| 210 |
2/2✓ Branch 1 taken 24 times.
✓ Branch 4 taken 24 times.
|
27 | return ExternalFile(model, filename, copyFile); |
| 211 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | } catch (std::exception&) { |
| 212 | 3 | } | |
| 213 | 3 | return boost::none; | |
| 214 | 31 | } | |
| 215 | |||
| 216 | 27 | ExternalFile::ExternalFile(const Model& model, const std::string& filename, bool copyFile) : ResourceObject(ExternalFile::iddObjectType(), model) { | |
| 217 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 27 times.
✗ Branch 5 not taken.
|
27 | OS_ASSERT(getImpl<detail::ExternalFile_Impl>()); |
| 218 | |||
| 219 |
1/1✓ Branch 1 taken 27 times.
|
27 | WorkflowJSON workflow = model.workflowJSON(); |
| 220 | |||
| 221 | // we expect all strings to be UTF-8 encoded | ||
| 222 |
1/1✓ Branch 1 taken 27 times.
|
27 | path p = toPath(filename); |
| 223 |
3/3✓ Branch 1 taken 27 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 24 times.
|
27 | if (!exists(p)) { |
| 224 |
1/1✓ Branch 1 taken 3 times.
|
3 | boost::optional<path> op = workflow.findFile(filename); |
| 225 |
1/2✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
|
3 | if (!op) { |
| 226 |
1/1✓ Branch 1 taken 3 times.
|
3 | this->remove(); |
| 227 |
21/21✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 13 taken 3 times.
✓ Branch 16 taken 3 times.
✓ Branch 20 taken 3 times.
✓ Branch 23 taken 3 times.
✓ Branch 26 taken 3 times.
✓ Branch 32 taken 3 times.
✓ Branch 35 taken 3 times.
✓ Branch 38 taken 3 times.
✓ Branch 41 taken 3 times.
✓ Branch 44 taken 3 times.
✓ Branch 47 taken 3 times.
✓ Branch 50 taken 3 times.
✓ Branch 53 taken 3 times.
✓ Branch 56 taken 3 times.
✓ Branch 59 taken 3 times.
✓ Branch 64 taken 3 times.
✓ Branch 67 taken 3 times.
|
3 | LOG_AND_THROW("Cannot find file \"" << filename << "\" for " << this->briefDescription()); |
| 228 | } | ||
| 229 | ✗ | p = op.get(); | |
| 230 | 3 | } | |
| 231 |
2/4✓ Branch 1 taken 24 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 6 not taken.
|
24 | OS_ASSERT(exists(p)); |
| 232 | |||
| 233 | bool ok; | ||
| 234 |
2/2✓ Branch 0 taken 21 times.
✓ Branch 1 taken 3 times.
|
24 | if (copyFile) { |
| 235 | 21 | path destDir; | |
| 236 |
1/1✓ Branch 1 taken 21 times.
|
21 | std::vector<path> absoluteFilePaths = workflow.absoluteFilePaths(); |
| 237 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 21 times.
|
21 | if (absoluteFilePaths.empty()) { |
| 238 | ✗ | destDir = workflow.absoluteRootDir(); | |
| 239 | } else { | ||
| 240 |
1/1✓ Branch 2 taken 21 times.
|
21 | destDir = absoluteFilePaths[0]; |
| 241 | } | ||
| 242 |
1/1✓ Branch 1 taken 21 times.
|
42 | path dest = destDir / p.filename(); |
| 243 | |||
| 244 |
3/3✓ Branch 1 taken 21 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 18 times.
|
21 | if (exists(dest)) { |
| 245 |
3/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 3 times.
|
3 | if (checksum(p) != checksum(dest)) { |
| 246 | ✗ | this->remove(); | |
| 247 | ✗ | LOG_AND_THROW("File \"" << p.filename() << "\" already exists in \"" << destDir << "\""); | |
| 248 | } | ||
| 249 | } else { | ||
| 250 | |||
| 251 | try { | ||
| 252 |
1/1✓ Branch 2 taken 18 times.
|
18 | makeParentFolder(dest, path(), true); |
| 253 | ✗ | } catch (std::exception&) { | |
| 254 | ✗ | this->remove(); | |
| 255 | ✗ | LOG_AND_THROW("Failed to created parent folder at \"" << dest << "\""); | |
| 256 | ✗ | } | |
| 257 | try { | ||
| 258 |
1/1✓ Branch 1 taken 18 times.
|
18 | boost::filesystem::copy(p, dest); |
| 259 | ✗ | } catch (std::exception&) { | |
| 260 | ✗ | this->remove(); | |
| 261 | ✗ | LOG_AND_THROW("Failed to copy file from \"" << p << "\" to \"" << dest << "\""); | |
| 262 | ✗ | } | |
| 263 | } | ||
| 264 |
4/4✓ Branch 1 taken 21 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 20 times.
✓ Branch 6 taken 1 time.
|
21 | OS_ASSERT(exists(dest)); |
| 265 | |||
| 266 |
2/2✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
|
21 | ok = setFileName(toString(dest.filename())); |
| 267 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 21 times.
✗ Branch 3 not taken.
|
21 | OS_ASSERT(ok); |
| 268 | 21 | } else { | |
| 269 |
1/1✓ Branch 1 taken 3 times.
|
3 | ok = setFileName(filename); |
| 270 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
|
3 | OS_ASSERT(ok); |
| 271 | } | ||
| 272 | 33 | } | |
| 273 | |||
| 274 | 7852 | IddObjectType ExternalFile::iddObjectType() { | |
| 275 |
1/1✓ Branch 1 taken 7852 times.
|
7852 | return {IddObjectType::OS_External_File}; |
| 276 | } | ||
| 277 | |||
| 278 | ✗ | std::vector<std::string> ExternalFile::columnSeparatorValues() { | |
| 279 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_External_FileFields::ColumnSeparator); | |
| 280 | } | ||
| 281 | |||
| 282 | 45 | std::string ExternalFile::fileName() const { | |
| 283 |
1/1✓ Branch 3 taken 45 times.
|
45 | return getImpl<detail::ExternalFile_Impl>()->fileName(); |
| 284 | } | ||
| 285 | |||
| 286 | 90 | path ExternalFile::filePath() const { | |
| 287 |
1/1✓ Branch 3 taken 90 times.
|
90 | return getImpl<detail::ExternalFile_Impl>()->filePath(); |
| 288 | } | ||
| 289 | |||
| 290 | //boost::optional<std::string> ExternalFile::columnSeparator() const { | ||
| 291 | // return getImpl<detail::ExternalFile_Impl>()->columnSeparator(); | ||
| 292 | //} | ||
| 293 | |||
| 294 | //bool ExternalFile::isColumnSeparatorDefaulted() const { | ||
| 295 | // return getImpl<detail::ExternalFile_Impl>()->isColumnSeparatorDefaulted(); | ||
| 296 | //} | ||
| 297 | |||
| 298 | 24 | bool ExternalFile::setFileName(const std::string& fileName) { | |
| 299 |
1/1✓ Branch 3 taken 24 times.
|
24 | return getImpl<detail::ExternalFile_Impl>()->setFileName(fileName); |
| 300 | } | ||
| 301 | |||
| 302 | //bool ExternalFile::setColumnSeparator(const std::string& columnSeparator) { | ||
| 303 | // return getImpl<detail::ExternalFile_Impl>()->setColumnSeparator(columnSeparator); | ||
| 304 | //} | ||
| 305 | |||
| 306 | //void ExternalFile::resetColumnSeparator() { | ||
| 307 | // getImpl<detail::ExternalFile_Impl>()->resetColumnSeparator(); | ||
| 308 | //} | ||
| 309 | |||
| 310 | //bool ExternalFile::isValid() { | ||
| 311 | // return getImpl<detail::ExternalFile_Impl>()->isValid(); | ||
| 312 | //} | ||
| 313 | |||
| 314 | 18 | std::vector<ScheduleFile> ExternalFile::scheduleFiles() const { | |
| 315 |
1/1✓ Branch 3 taken 18 times.
|
18 | return getImpl<detail::ExternalFile_Impl>()->scheduleFiles(); |
| 316 | } | ||
| 317 | |||
| 318 | 5 | std::vector<PythonPluginInstance> ExternalFile::pythonPluginInstances() const { | |
| 319 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::ExternalFile_Impl>()->pythonPluginInstances(); |
| 320 | } | ||
| 321 | |||
| 322 | 6 | std::vector<ChillerElectricASHRAE205> ExternalFile::chillerElectricASHRAE205s() const { | |
| 323 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::ExternalFile_Impl>()->chillerElectricASHRAE205s(); |
| 324 | } | ||
| 325 | |||
| 326 | /// @cond | ||
| 327 |
1/1✓ Branch 3 taken 157 times.
|
157 | ExternalFile::ExternalFile(std::shared_ptr<detail::ExternalFile_Impl> impl) : ResourceObject(std::move(impl)) {} |
| 328 | /// @endcond | ||
| 329 | |||
| 330 | } // namespace model | ||
| 331 | } // namespace openstudio | ||
| 332 |