1 // File: Model_AttributeRefList.h
3 // Author: Mikhail PONIKAROV
5 #ifndef Model_AttributeRefList_HeaderFile
6 #define Model_AttributeRefList_HeaderFile
9 #include "ModelAPI_AttributeRefList.h"
10 #include <TDataStd_ReferenceList.hxx>
12 /**\class Model_AttributeRefList
14 * \brief Attribute that contains list of references to features (located in the same document).
17 class Model_AttributeRefList : public ModelAPI_AttributeRefList
19 Handle_TDataStd_ReferenceList myRef; ///< references to the features labels
21 /// Appends the feature to the end of a list
22 MODEL_EXPORT virtual void append(boost::shared_ptr<ModelAPI_Feature> theFeature);
24 /// Erases the first meet of the feature in the list
25 MODEL_EXPORT virtual void remove(boost::shared_ptr<ModelAPI_Feature> theFeature);
27 /// Returns number of features in the list
28 MODEL_EXPORT virtual int size();
30 /// Returns the list of features
31 MODEL_EXPORT virtual std::list<boost::shared_ptr<ModelAPI_Feature> > list();
34 /// Objects are created for features automatically
35 MODEL_EXPORT Model_AttributeRefList(TDF_Label& theLabel);
37 friend class Model_Data;