1 // File: ModelAPI_AttributeRefList.h
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_AttributeRefList_HeaderFile
6 #define ModelAPI_AttributeRefList_HeaderFile
8 #include "ModelAPI_Attribute.h"
11 /**\class ModelAPI_AttributeRefList
13 * \brief Attribute that contains list of references to features (located in the same document).
16 class ModelAPI_AttributeRefList : public ModelAPI_Attribute
19 /// Returns the type of this class of attributes
20 MODELAPI_EXPORT static std::string type() {return "RefList";}
22 /// Returns the type of this class of attributes, not static method
23 MODELAPI_EXPORT virtual std::string attributeType() {return type();}
25 /// Appends the feature to the end of a list
26 MODELAPI_EXPORT virtual void append(boost::shared_ptr<ModelAPI_Feature> theFeature) = 0;
28 /// Erases the first meet of the feature in the list
29 MODELAPI_EXPORT virtual void remove(boost::shared_ptr<ModelAPI_Feature> theFeature) = 0;
31 /// Returns number of features in the list
32 MODELAPI_EXPORT virtual int size() = 0;
34 /// Returns the list of features
35 MODELAPI_EXPORT virtual std::list<boost::shared_ptr<ModelAPI_Feature> > list() = 0;
38 /// Objects are created for features automatically
39 MODELAPI_EXPORT ModelAPI_AttributeRefList()