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

Method remove

src/model/ModelObject.cpp:568–574  ·  view source on GitHub ↗

remove the object from the model, also removes any cost objects associated with this object return std::vector containing any removed object(s)

Source from the content-addressed store, hash-verified

566 /// remove the object from the model, also removes any cost objects associated with this object
567 /// return std::vector<IdfObject> containing any removed object(s)
568 std::vector<IdfObject> ModelObject_Impl::remove() {
569 // We need to **guarantee** that WorkspaceObject_Impl::remove() is called last. C++ does not guarantee the order in which function parameters
570 // are evaluated, so I can't pass the three remove to concat<IdfObject>(Args&&...) (on GCC it was calling Workspace_Impl::remove first)
571 auto result = concat<IdfObject>(this->removeLifeCycleCosts(), this->removeAdditionalProperties());
572 openstudio::detail::concat_helper(result, WorkspaceObject_Impl::remove());
573 return result;
574 }
575
576 Component ModelObject_Impl::createComponent() const {
577 // component contents is defined by clone

Callers 4

removeLifeCycleCostsMethod · 0.45
cloneMethod · 0.45
additionalPropertiesMethod · 0.45

Calls 3

removeLifeCycleCostsMethod · 0.95
concat_helperFunction · 0.85

Tested by

no test coverage detected