1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_AttributeSelectionList.h
4 // Created: 22 Oct 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef ModelAPI_AttributeSelectionList_H_
8 #define ModelAPI_AttributeSelectionList_H_
10 #include "ModelAPI_AttributeSelection.h"
11 #include <ModelAPI_Result.h>
13 /**\class ModelAPI_AttributeSelectionList
15 * \brief Attribute that contains list of references to the sub-shapes with
16 * possibility to manage them.
19 class ModelAPI_AttributeSelectionList : public ModelAPI_Attribute
22 /// Adds the new reference to the end of the list
23 virtual void append(const ResultPtr& theContext,
24 const GeomShapePtr& theSubShape) = 0;
26 /// Adds the new reference to the end of the list by the naming name of the selected shape
27 /// The type of shape is taken from the current selection type
28 virtual void append(std::string theNamingName) = 0;
30 /// Returns the number ofselection attributes in the list
31 virtual int size() = 0;
33 virtual int selectionType() = 0;
35 virtual void setSelectionType(int) = 0;
37 /// Returns the attribute selection by the index (zero based)
38 virtual std::shared_ptr<ModelAPI_AttributeSelection> value(const int theIndex) = 0;
40 /// Returns all attributes
41 virtual void clear() = 0;
43 /// Returns the type of this class of attributes
44 static std::string type()
46 return "SelectionList";
49 /// Returns the type of this class of attributes, not static method
50 virtual std::string attributeType()
55 /// To virtually destroy the fields of successors
56 virtual ~ModelAPI_AttributeSelectionList()
61 /// Objects are created for features automatically
62 MODELAPI_EXPORT ModelAPI_AttributeSelectionList()
67 //! Pointer on double attribute
68 typedef std::shared_ptr<ModelAPI_AttributeSelectionList> AttributeSelectionListPtr;