| 364 | } |
| 365 | |
| 366 | boost::optional<OutputSQLite> Model_Impl::outputSQLite() const { |
| 367 | if (m_cachedOutputSQLite) { |
| 368 | return m_cachedOutputSQLite; |
| 369 | } |
| 370 | |
| 371 | boost::optional<OutputSQLite> result = this->model().getOptionalUniqueModelObject<OutputSQLite>(); |
| 372 | if (result) { |
| 373 | m_cachedOutputSQLite = result; |
| 374 | result->getImpl<OutputSQLite_Impl>() |
| 375 | .get() |
| 376 | ->OutputSQLite_Impl::onRemoveFromWorkspace.connect<Model_Impl, &Model_Impl::clearCachedOutputSQLite>( |
| 377 | const_cast<openstudio::model::detail::Model_Impl*>(this)); |
| 378 | } |
| 379 | |
| 380 | return m_cachedOutputSQLite; |
| 381 | } |
| 382 | |
| 383 | boost::optional<OutputEnergyManagementSystem> Model_Impl::outputEnergyManagementSystem() const { |
| 384 | if (m_cachedOutputEnergyManagementSystem) { |