MCPcopy Create free account
hub / github.com/MITK/MITK / GetNonConstProperty

Method GetNonConstProperty

Modules/Core/src/DataManagement/mitkDataNode.cpp:619–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617}
618
619mitk::BaseProperty * mitk::DataNode::GetNonConstProperty(const std::string &propertyKey, const std::string &contextName, bool fallBackOnDefaultContext)
620{
621 if (propertyKey.empty())
622 return nullptr;
623
624 if (!contextName.empty())
625 {
626 auto propertyListIter = m_MapOfPropertyLists.find(contextName);
627
628 if (m_MapOfPropertyLists.end() != propertyListIter)
629 {
630 auto property = propertyListIter->second->GetProperty(propertyKey);
631
632 if (nullptr != property)
633 return property;
634 }
635 }
636
637 if (contextName.empty() || fallBackOnDefaultContext)
638 {
639 auto property = m_PropertyList->GetProperty(propertyKey);
640
641 if (nullptr == property && m_Data.IsNotNull())
642 property = m_Data->GetProperty(propertyKey.c_str());
643
644 return property;
645 }
646
647 return nullptr;
648}
649
650void mitk::DataNode::SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName, bool fallBackOnDefaultContext)
651{

Callers

nothing calls this directly

Calls 5

IsNotNullMethod · 0.80
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
GetPropertyMethod · 0.45

Tested by

no test coverage detected