20 #ifndef ModelAPI_FiltersArgs_H_
21 #define ModelAPI_FiltersArgs_H_
23 #include "ModelAPI_FiltersFeature.h"
28 static const std::string kFilterSeparator =
"__";
33 std::map<std::string, AttributePtr> myMap;
34 std::string myCurrentFilter;
35 FiltersFeaturePtr myFeature;
41 myCurrentFilter = theFilterID;
46 myFeature = theFeature;
50 void add(AttributePtr theAttribute) {
51 myMap[theAttribute->id()] = theAttribute;
55 AttributePtr
argument(
const std::string& theID)
const {
56 return myMap.find(myCurrentFilter + kFilterSeparator + theID)->second;
60 const std::string& theID,
const std::string theAttrType) {
61 AttributePtr aR = myFeature->data()->addFloatingAttribute(theID, theAttrType, myCurrentFilter);
62 aR->setIsArgument(
false);
definition of arguments of filters: id of the argument to attributes
Definition: ModelAPI_FiltersArgs.h:31
void add(AttributePtr theAttribute)
Appends an argument of a filter.
Definition: ModelAPI_FiltersArgs.h:50
std::shared_ptr< ModelAPI_Attribute > initAttribute(const std::string &theID, const std::string theAttrType)
adds an attribute of the filter
Definition: ModelAPI_FiltersArgs.h:59
AttributePtr argument(const std::string &theID) const
returns the argument of the current filter by the argument id
Definition: ModelAPI_FiltersArgs.h:55
void setFilter(const std::string &theFilterID)
Sets the current filter ID.
Definition: ModelAPI_FiltersArgs.h:40
void setFeature(const FiltersFeaturePtr theFeature)
Sets the current feature.
Definition: ModelAPI_FiltersArgs.h:45