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

Method getCopy

src/model/Model.cpp:3894–3904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3892 }
3893
3894 std::shared_ptr<openstudio::detail::WorkspaceObject_Impl>
3895 detail::Model_Impl::ModelObjectCreator::getCopy(Model_Impl* model, const std::shared_ptr<openstudio::detail::WorkspaceObject_Impl>& obj,
3896 bool keepHandle) const {
3897 auto typeToCreate = obj->iddObject().type();
3898 std::shared_ptr<openstudio::detail::WorkspaceObject_Impl> result;
3899 auto it = m_copyMap.find(typeToCreate);
3900 if (it != m_copyMap.end()) {
3901 result = it->second(model, obj, keepHandle);
3902 }
3903 return result;
3904 }
3905
3906 detail::Model_Impl::ModelObjectCreator::ModelObjectCreator() {
3907#define REGISTER_CONSTRUCTOR(_className) \

Callers 1

createObjectMethod · 0.80

Calls 4

iddObjectMethod · 0.80
typeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected