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,
62 const bool theIsIgnoreGroups =
false) = 0;
65 virtual void append(
const std::string& theType,
const std::wstring& theContextName,
66 const int theIndex) = 0;
69 virtual void copyTo(std::shared_ptr<ModelAPI_AttributeSelectionList> theTarget)
const = 0;
79 virtual void remove(
const std::set<int>& theIndices) = 0;
90 const ObjectPtr& theContext,
const std::shared_ptr<GeomAPI_Shape>& theSubShape,
91 const bool theTemporarily =
false) = 0;
102 virtual std::shared_ptr<ModelAPI_AttributeSelection>
value(
const int theIndex) = 0;
112 virtual void setGeometricalSelection(
const bool theIsGeometricalSelection) = 0;
120 return "SelectionList";
130 MODELAPI_EXPORT
virtual FiltersFeaturePtr
filters()
const = 0;
133 MODELAPI_EXPORT
virtual void setFilters(FiltersFeaturePtr theFeature) = 0;
143 return myIsWholeResultAllowed;
148 myIsWholeResultAllowed = theFlag;
158 myMakeCopy = theFlag;
164 {myIsWholeResultAllowed =
false; myMakeCopy =
false;}
169typedef 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 std::shared_ptr< ModelAPI_AttributeSelection > value(const int theIndex)=0
Returns the attribute selection by the index (zero based)
virtual void append(const std::shared_ptr< GeomAPI_Pnt > &thePoint, const std::string &theType, const bool theIsIgnoreGroups=false)=0
Adds the new reference to the end of the list by inner point on the selected shape.
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 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:157
virtual void applyFilters()=0
Applies the filters to this selection list.
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:163
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 void removeFilters()=0
Removes the filters of this selection list.
virtual const bool isWholeResultAllowed() const
Returns true if the whole result selection corresponds to selection of all sub-shapes.
Definition: ModelAPI_AttributeSelectionList.h:142
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 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:147
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:152
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:118
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