1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: Model_AttributeRefList.h
5 // Author: Mikhail PONIKAROV
7 #ifndef Model_AttributeRefList_H_
8 #define Model_AttributeRefList_H_
11 #include "ModelAPI_AttributeRefList.h"
12 #include "ModelAPI_Feature.h"
14 #include <TDataStd_ReferenceList.hxx>
16 /**\class Model_AttributeRefList
18 * \brief Attribute that contains list of references to features (located in the same document).
21 class Model_AttributeRefList : public ModelAPI_AttributeRefList
23 Handle_TDataStd_ReferenceList myRef; ///< references to the features labels
25 /// Appends the feature to the end of a list
26 MODEL_EXPORT virtual void append(ObjectPtr theObject);
28 /// Erases the first meet of the feature in the list
29 MODEL_EXPORT virtual void remove(ObjectPtr theObject);
31 /// Returns number of features in the list
32 MODEL_EXPORT virtual int size() const;
34 /// Returns the list of features
35 MODEL_EXPORT virtual std::list<ObjectPtr> list();
37 /// Returns the list of features
38 MODEL_EXPORT virtual ObjectPtr object(const int theIndex) const;
40 /// Returns true if attribute was initialized by some value
41 MODEL_EXPORT virtual bool isInitialized();
43 /// Objects are created for features automatically
44 MODEL_EXPORT Model_AttributeRefList(TDF_Label& theLabel);
46 friend class Model_Data;