| 574 | } |
| 575 | |
| 576 | Component ModelObject_Impl::createComponent() const { |
| 577 | // component contents is defined by clone |
| 578 | Model temp; |
| 579 | ModelObject cloneOfThis = this->clone(temp); |
| 580 | // ensure that the first object in contents is cloneOfThis (the primary object). |
| 581 | ModelObjectVector contents = castVector<ModelObject>(temp.objects(true)); |
| 582 | OS_ASSERT(contents[0] == cloneOfThis); |
| 583 | return Component(contents); |
| 584 | } |
| 585 | |
| 586 | boost::optional<ParentObject> ModelObject_Impl::parent() const { |
| 587 | return {}; |