1 // File: Model_AttributeSelectionList.h
2 // Created: 22 Oct 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef Model_AttributeSelectionList_H_
6 #define Model_AttributeSelectionList_H_
9 #include "Model_AttributeSelection.h"
10 #include <ModelAPI_AttributeSelectionList.h>
11 #include <TDataStd_Integer.hxx>
14 /**\class Model_AttributeSelectionList
16 * \brief Attribute that contains list of references to the sub-shapes with
17 * possibility to manage them.
20 class Model_AttributeSelectionList : public ModelAPI_AttributeSelectionList
22 Handle(TDataStd_Integer) mySize; ///< Contains size of this list
23 std::vector<boost::shared_ptr<Model_AttributeSelection> > mySubs; /// the selection attributes
25 /// Adds the new reference to the end of the list
26 MODEL_EXPORT virtual void append(
27 const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape);
29 /// Returns the number ofselection attributes in the list
30 MODEL_EXPORT virtual int size();
32 /// Returns the attribute selection by the index (zero based)
33 MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeSelection> value(const int theIndex);
35 /// Returns all attributes
36 MODEL_EXPORT virtual void clear();
38 /// Sets the feature object
39 MODEL_EXPORT virtual void setObject(const boost::shared_ptr<ModelAPI_Object>& theObject);
42 /// Objects are created for features automatically
43 MODEL_EXPORT Model_AttributeSelectionList(TDF_Label& theLabel);
44 /// Performs the selection for the body result (TNaming Selection)
46 friend class Model_Data;