1 // File: ModelAPI_AttributeRefList.h
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_AttributeRefList_HeaderFile
6 #define ModelAPI_AttributeRefList_HeaderFile
8 #include "ModelAPI_Attribute.h"
9 #include "ModelAPI_Feature.h"
12 /**\class ModelAPI_AttributeRefList
14 * \brief Attribute that contains list of references to features (located in the same document).
17 class ModelAPI_AttributeRefList : public ModelAPI_Attribute
20 /// Returns the type of this class of attributes
21 MODELAPI_EXPORT static std::string type() {return "RefList";}
23 /// Returns the type of this class of attributes, not static method
24 MODELAPI_EXPORT virtual std::string attributeType() {return type();}
26 /// Appends the feature to the end of a list
27 MODELAPI_EXPORT virtual void append(FeaturePtr theFeature) = 0;
29 /// Erases the first meet of the feature in the list
30 MODELAPI_EXPORT virtual void remove(FeaturePtr theFeature) = 0;
32 /// Returns number of features in the list
33 MODELAPI_EXPORT virtual int size() = 0;
35 /// Returns the list of features
36 MODELAPI_EXPORT virtual std::list<FeaturePtr > list() = 0;
39 /// Objects are created for features automatically
40 MODELAPI_EXPORT ModelAPI_AttributeRefList()