| 24 | } |
| 25 | |
| 26 | bool mitk::PropertyDescriptions::AddDescription(const std::string &propertyName, |
| 27 | const std::string &description, |
| 28 | const std::string &className, |
| 29 | bool overwrite) |
| 30 | { |
| 31 | if (propertyName.empty()) |
| 32 | return false; |
| 33 | |
| 34 | DescriptionMap &descriptions = m_Descriptions[className]; |
| 35 | std::pair<DescriptionMapIterator, bool> ret = descriptions.insert(std::make_pair(propertyName, description)); |
| 36 | |
| 37 | if (!ret.second && overwrite) |
| 38 | { |
| 39 | ret.first->second = description; |
| 40 | ret.second = true; |
| 41 | } |
| 42 | |
| 43 | return ret.second; |
| 44 | } |
| 45 | |
| 46 | bool mitk::PropertyDescriptions::AddDescriptionRegEx(const std::string &propertyRegEx, |
| 47 | const std::string &description, |