| 511 | } |
| 512 | |
| 513 | boost::optional<RunPeriod> Model_Impl::runPeriod() const { |
| 514 | if (m_cachedRunPeriod) { |
| 515 | return m_cachedRunPeriod; |
| 516 | } |
| 517 | |
| 518 | boost::optional<RunPeriod> result = this->model().getOptionalUniqueModelObject<RunPeriod>(); |
| 519 | if (result) { |
| 520 | m_cachedRunPeriod = result; |
| 521 | result->getImpl<RunPeriod_Impl>()->RunPeriod_Impl::onRemoveFromWorkspace.connect<Model_Impl, &Model_Impl::clearCachedRunPeriod>( |
| 522 | const_cast<openstudio::model::detail::Model_Impl*>(this)); |
| 523 | } |
| 524 | |
| 525 | return m_cachedRunPeriod; |
| 526 | } |
| 527 | |
| 528 | boost::optional<RunPeriodControlDaylightSavingTime> Model_Impl::runPeriodControlDaylightSavingTime() const { |
| 529 | if (m_cachedRunPeriodControlDaylightSavingTime) { |
no test coverage detected