| 275 | } |
| 276 | |
| 277 | bool WeatherFile_Impl::makeUrlRelative(const openstudio::path& basePath) { |
| 278 | boost::optional<openstudio::path> currentPath = this->path(); |
| 279 | if (currentPath) { |
| 280 | openstudio::path newPath; |
| 281 | if (basePath.empty()) { |
| 282 | newPath = currentPath->filename(); |
| 283 | } else { |
| 284 | newPath = relativePath(*currentPath, basePath); |
| 285 | } |
| 286 | if (!newPath.empty()) { |
| 287 | std::string weatherFileUrl = toString(newPath); |
| 288 | LOG(Debug, "Setting weather file url to " << weatherFileUrl); |
| 289 | return setString(OS_WeatherFileFields::Url, weatherFileUrl); |
| 290 | } |
| 291 | } |
| 292 | return false; |
| 293 | } |
| 294 | |
| 295 | bool WeatherFile_Impl::makeUrlAbsolute(const openstudio::path& searchDirectory) { |
| 296 | boost::optional<openstudio::path> currentPath = this->path(); |
nothing calls this directly
no test coverage detected