MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / createComponent

Method createComponent

src/model/ModelObject.cpp:576–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {};

Callers 5

TEST_FFunction · 0.80
TEST_FFunction · 0.80
SetUpTestSuiteMethod · 0.80

Calls 3

cloneMethod · 0.95
ComponentClass · 0.70
objectsMethod · 0.45

Tested by 5

TEST_FFunction · 0.64
TEST_FFunction · 0.64
SetUpTestSuiteMethod · 0.64