-/// separator between the filter name and the filter attribute ID
-static const std::string kFilterSeparator = "__";
-
-/// definition of arguments of filters: id of the argument to attributes
-class ModelAPI_FiltersArgs {
- /// a map from the FilterID+AttributeID -> attribute
- std::map<std::string, AttributePtr> myMap;
- std::string myCurrentFilter; ///< ID of the filter that will take attributes now
-public:
- ModelAPI_FiltersArgs() {}
-
- /// Sets the current filter ID
- void setFilter(const std::string& theFilterID) {
- myCurrentFilter = theFilterID;
- }
-
- /// Appends an argument of a filter
- void add(AttributePtr theAttribute) {
- myMap[theAttribute->id()] = theAttribute;
- }
-
- /// returns the argument of the current filter by the argument id
- AttributePtr argument(const std::string& theID) {
- return myMap.find(myCurrentFilter + kFilterSeparator + theID)->second;
- }
-
-};