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

Method GetConstProperty

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

Source from the content-addressed store, hash-verified

586}
587
588mitk::BaseProperty::ConstPointer mitk::DataNode::GetConstProperty(const std::string &propertyKey, const std::string &contextName, bool fallBackOnDefaultContext) const
589{
590 if (propertyKey.empty())
591 return nullptr;
592
593 if (!contextName.empty())
594 {
595 auto propertyListIter = m_MapOfPropertyLists.find(contextName);
596
597 if (m_MapOfPropertyLists.end() != propertyListIter)
598 {
599 BaseProperty::ConstPointer property = propertyListIter->second->GetProperty(propertyKey);
600
601 if (property.IsNotNull())
602 return property;
603 }
604 }
605
606 if (contextName.empty() || fallBackOnDefaultContext)
607 {
608 BaseProperty::ConstPointer property = m_PropertyList->GetProperty(propertyKey);
609
610 if (property.IsNull() && m_Data.IsNotNull())
611 property = m_Data->GetProperty(propertyKey.c_str());
612
613 return property;
614 }
615
616 return nullptr;
617}
618
619mitk::BaseProperty * mitk::DataNode::GetNonConstProperty(const std::string &propertyKey, const std::string &contextName, bool fallBackOnDefaultContext)
620{

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected