20 #ifndef ModelAPI_AttributeSelectionList_H_
21 #define ModelAPI_AttributeSelectionList_H_
23 #include "ModelAPI_AttributeSelection.h"
24 #include <ModelAPI_Result.h>
25 #include <ModelAPI_Filter.h>
41 bool myIsWholeResultAllowed;
51 virtual void append(
const ObjectPtr& theContext,
52 const std::shared_ptr<GeomAPI_Shape>& theSubShape,
53 const bool theTemporarily =
false) = 0;
57 virtual void append(
const std::wstring& theNamingName,
const std::string& theType =
"") = 0;
60 virtual void append(
const std::shared_ptr<GeomAPI_Pnt>& thePoint,
61 const std::string& theType) = 0;
64 virtual void append(
const std::string& theType,
const std::wstring& theContextName,
65 const int theIndex) = 0;
68 virtual void copyTo(std::shared_ptr<ModelAPI_AttributeSelectionList> theTarget)
const = 0;
78 virtual void remove(
const std::set<int>& theIndices) = 0;
89 const ObjectPtr& theContext,
const std::shared_ptr<GeomAPI_Shape>& theSubShape,
90 const bool theTemporarily =
false) = 0;
101 virtual std::shared_ptr<ModelAPI_AttributeSelection>
value(
const int theIndex) = 0;
111 virtual void setGeometricalSelection(
const bool theIsGeometricalSelection) = 0;
119 return "SelectionList";
129 MODELAPI_EXPORT
virtual FiltersFeaturePtr
filters()
const = 0;
132 MODELAPI_EXPORT
virtual void setFilters(FiltersFeaturePtr theFeature) = 0;
136 return myIsWholeResultAllowed;
141 myIsWholeResultAllowed = theFlag;
151 myMakeCopy = theFlag;
157 {myIsWholeResultAllowed =
false; myMakeCopy =
false;}
162 typedef std::shared_ptr<ModelAPI_AttributeSelectionList> AttributeSelectionListPtr;
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Attribute that contains list of references to the sub-shapes with possibility to manage them.
Definition: ModelAPI_AttributeSelectionList.h:37
virtual const std::string selectionType() const =0
The type of all elements selection.
virtual bool isGeometricalSelection() const =0
Returns true if is geometrical selection.
virtual void append(const ObjectPtr &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape, const bool theTemporarily=false)=0
Adds the new reference to the end of the list.
virtual void removeTemporaryValues()=0
Reset temporary stored values.
virtual void clear()=0
Removes all attributes of the list.
virtual std::shared_ptr< ModelAPI_AttributeSelection > value(const int theIndex)=0
Returns the attribute selection by the index (zero based)
virtual void setSelectionType(const std::string &theType)=0
Sets the type of all elements selection.
virtual void setMakeCopy(const bool theFlag)
Sets true if a copy features must be used in update in history.
Definition: ModelAPI_AttributeSelectionList.h:150
virtual ~ModelAPI_AttributeSelectionList()
To virtually destroy the fields of successors.
Definition: ModelAPI_AttributeSelectionList.cpp:27
virtual bool isInList(const ObjectPtr &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape, const bool theTemporarily=false)=0
Returns true if the object with the shape are in list.
ModelAPI_AttributeSelectionList()
Default constructor.
Definition: ModelAPI_AttributeSelectionList.h:156
virtual void remove(const std::set< int > &theIndices)=0
Removes the elements from the list.
virtual void cashValues(const bool theEnabled)=0
Starts or stops cashing of the values in the attribute (the cash may become invalid on modification o...
virtual void copyTo(std::shared_ptr< ModelAPI_AttributeSelectionList > theTarget) const =0
Copy the selection list to the destination attribute.
virtual const bool isWholeResultAllowed() const
Returns true if the whole result selection corresponds to selection of all sub-shapes.
Definition: ModelAPI_AttributeSelectionList.h:135
virtual void removeLast()=0
Removes the last element in the list.
virtual FiltersFeaturePtr filters() const =0
Returns a selection filters feature if it is defined for this selection list.
virtual void append(const std::shared_ptr< GeomAPI_Pnt > &thePoint, const std::string &theType)=0
Adds the new reference to the end of the list by inner point on the selected shape.
virtual void setFilters(FiltersFeaturePtr theFeature)=0
Sets a selection filters feature if it is defined for this selection list.
virtual void setWholeResultAllowed(const bool theFlag)
Sets whether the whole result selection corresponds to selection of all sub-shapes.
Definition: ModelAPI_AttributeSelectionList.h:140
virtual void append(const std::string &theType, const std::wstring &theContextName, const int theIndex)=0
Adds the new reference to the end of the list by weak naming index.
virtual std::string attributeType()
Returns the type of this class of attributes, not static method.
Definition: ModelAPI_AttributeSelectionList.cpp:22
virtual const bool isMakeCopy() const
Returns true if a copy features must be used in update in history.
Definition: ModelAPI_AttributeSelectionList.h:145
virtual int size()=0
Returns the number of selection attributes in the list.
static std::string typeId()
Returns the type of this class of attributes.
Definition: ModelAPI_AttributeSelectionList.h:117
virtual void append(const std::wstring &theNamingName, const std::string &theType="")=0
Adds the new reference to the end of the list by the naming name of the selected shape The type of sh...
Generic attribute of the Object.
Definition: ModelAPI_Attribute.h:34