| 617 | } |
| 618 | |
| 619 | mitk::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 | |
| 650 | void mitk::DataNode::SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName, bool fallBackOnDefaultContext) |
| 651 | { |
nothing calls this directly
no test coverage detected