32 typedef std::map<std::string, mitk::BaseProperty::Pointer> PropertyMap;
33 typedef PropertyMap::const_iterator PropertyMapConstIterator;
35 PropertyMap propertyMap;
48 propertyFilters->
AddFilter(restrictedFilter,
"className");
50 PropertyMap filteredPropertyMap = propertyFilters->
ApplyFilter(propertyMap);
51 PropertyMapConstIterator it1 = filteredPropertyMap.find(
"propertyName1");
52 PropertyMapConstIterator it2 = filteredPropertyMap.find(
"propertyName2");
53 PropertyMapConstIterator it3 = filteredPropertyMap.find(
"propertyName3");
56 it1 != filteredPropertyMap.end() && it2 != filteredPropertyMap.end() && it3 == filteredPropertyMap.end(),
57 "Apply global property filter");
59 filteredPropertyMap = propertyFilters->
ApplyFilter(propertyMap,
"className");
60 it1 = filteredPropertyMap.find(
"propertyName1");
61 it2 = filteredPropertyMap.find(
"propertyName2");
62 it3 = filteredPropertyMap.find(
"propertyName3");
65 it1 != filteredPropertyMap.end() && it2 == filteredPropertyMap.end() && it3 == filteredPropertyMap.end(),
66 "Apply restricted property filter (also respects global filter)");
void AddEntry(const std::string &propertyName, List list)
Add a filter entry for a specific property.
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
virtual bool AddFilter(const PropertyFilter &filter, const std::string &className="", bool overwrite=false)=0
Add a property filter.
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
virtual std::map< std::string, BaseProperty::Pointer > ApplyFilter(const std::map< std::string, BaseProperty::Pointer > &propertyMap, const std::string &className="") const =0
Apply property filter to property list.
#define MITK_TEST_CONDITION(COND, MSG)
Interface of property filters service.
static IPropertyFilters * GetPropertyFilters(us::ModuleContext *context=us::GetModuleContext())
Get an IPropertyFilters instance.
int mitkPropertyFiltersTest(int, char *[])
Consists of blacklist and whitelist entries.