Overriding this from WorkspaceObject_Impl is how all objects in the model end up as model objects
| 153 | // Overriding this from WorkspaceObject_Impl is how all objects in the model end up |
| 154 | // as model objects |
| 155 | std::shared_ptr<openstudio::detail::WorkspaceObject_Impl> Model_Impl::createObject(const IdfObject& object, bool keepHandle) { |
| 156 | auto result = modelObjectCreator.getNew(this, object, keepHandle); |
| 157 | |
| 158 | if (!result) { |
| 159 | if (object.iddObject().type().value() != IddObjectType::CommentOnly) { |
| 160 | LOG(Warn, "Creating GenericModelObject for IddObjectType '" << object.iddObject().type().valueName() << "'."); |
| 161 | } |
| 162 | result = std::shared_ptr<GenericModelObject_Impl>(new GenericModelObject_Impl(object, this, keepHandle)); |
| 163 | } |
| 164 | |
| 165 | return result; |
| 166 | } |
| 167 | |
| 168 | std::shared_ptr<openstudio::detail::WorkspaceObject_Impl> |
| 169 | Model_Impl::createObject(const std::shared_ptr<openstudio::detail::WorkspaceObject_Impl>& originalObjectImplPtr, bool keepHandle) { |