20#ifndef Model_AttributeSelectionList_H_
21#define Model_AttributeSelectionList_H_
24#include "Model_AttributeSelection.h"
25#include <ModelAPI_AttributeSelectionList.h>
26#include <TDataStd_Integer.hxx>
27#include <TDataStd_Comment.hxx>
40 Handle(TDataStd_Integer) mySize;
42 Handle(TDataStd_Comment) mySelectionType;
43 std::shared_ptr<Model_AttributeSelection> myTmpAttr;
45 std::map<ObjectPtr, std::list<std::shared_ptr<GeomAPI_Shape> > > myCash;
53 MODEL_EXPORT
virtual void append(
54 const ObjectPtr& theContext,
const std::shared_ptr<GeomAPI_Shape>& theSubShape,
55 const bool theTemporarily =
false);
59 MODEL_EXPORT
virtual void append(
const std::wstring& theNamingName,
60 const std::string& theType=
"");
63 MODEL_EXPORT
virtual void append(
const std::shared_ptr<GeomAPI_Pnt>& thePoint,
64 const std::string& theType,
65 const bool theIsIgnoreGroups =
false);
68 MODEL_EXPORT
virtual void append(
const std::string& theType,
69 const std::wstring& theContextName,
73 MODEL_EXPORT
virtual void copyTo(AttributeSelectionListPtr theTarget)
const;
83 MODEL_EXPORT
virtual void remove(
const std::set<int>& theIndices);
86 MODEL_EXPORT
virtual int size();
94 const ObjectPtr& theContext,
const std::shared_ptr<GeomAPI_Shape>& theSubShape,
95 const bool theTemporarily =
false);
106 MODEL_EXPORT
virtual std::shared_ptr<ModelAPI_AttributeSelection>
value(
const int theIndex);
109 MODEL_EXPORT
virtual void clear();
117 MODEL_EXPORT
virtual void cashValues(
const bool theEnabled);
119 MODEL_EXPORT
virtual void setGeometricalSelection(
const bool theIsGeometricalSelection)
override;
125 MODEL_EXPORT
virtual FiltersFeaturePtr
filters()
const;
128 MODEL_EXPORT
virtual void setFilters(FiltersFeaturePtr theFeature);
Attribute that contains list of references to the sub-shapes with possibility to manage them.
Definition: ModelAPI_AttributeSelectionList.h:37
Attribute that contains list of references to the sub-shapes with possibility to manage them.
Definition: Model_AttributeSelectionList.h:38
virtual void clear()
Returns all attributes.
Definition: Model_AttributeSelectionList.cpp:397
bool merge(Model_AttributeSelection *theStart)
Tries to merge attributes in this list with the same result shape.
virtual int size()
Returns the number of selection attributes in the list.
Definition: Model_AttributeSelectionList.cpp:290
virtual FiltersFeaturePtr filters() const
Returns a selection filters feature if it is defined for this selection list.
Definition: Model_AttributeSelectionList.cpp:517
virtual bool isInList(const ObjectPtr &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape, const bool theTemporarily=false)
Returns true if the object with the shape are in list.
Definition: Model_AttributeSelectionList.cpp:310
virtual void setSelectionType(const std::string &theType)
Sets the type of all elements selection.
Definition: Model_AttributeSelectionList.cpp:372
virtual void applyFilters()
Applies the filters to this selection list.
Definition: Model_AttributeSelectionList.cpp:558
virtual void removeLast()
Removes the last element in the list.
Definition: Model_AttributeSelectionList.cpp:158
virtual void removeFilters()
Removes the filters of this selection list.
Definition: Model_AttributeSelectionList.cpp:586
virtual void copyTo(AttributeSelectionListPtr theTarget) const
Copy the selection list to the destination attribute.
Definition: Model_AttributeSelectionList.cpp:280
virtual void reinit()
Reinitializes the internal state of the attribute (may be needed on undo/redo, abort,...
Definition: Model_AttributeSelectionList.cpp:433
virtual void setFilters(FiltersFeaturePtr theFeature)
Sets a selection filters feature if it is defined for this selection list.
Definition: Model_AttributeSelectionList.cpp:540
virtual void remove(const std::set< int > &theIndices)
Removes the elements from the list.
Definition: Model_AttributeSelectionList.cpp:249
virtual void removeTemporaryValues()
Reset temporary stored values.
Definition: Model_AttributeSelectionList.cpp:151
virtual void append(const ObjectPtr &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape, const bool theTemporarily=false)
Adds the new reference to the end of the list.
Definition: Model_AttributeSelectionList.cpp:61
virtual std::shared_ptr< ModelAPI_AttributeSelection > value(const int theIndex)
Returns the attribute selection by the index (zero based)
Definition: Model_AttributeSelectionList.cpp:378
virtual void cashValues(const bool theEnabled)
Starts or stops cashing of the values in the attribute (the cash may become invalid on modification o...
Definition: Model_AttributeSelectionList.cpp:446
virtual bool isGeometricalSelection() const override
Returns true if is geometrical selection.
Definition: Model_AttributeSelectionList.cpp:461
Model_AttributeSelectionList(TDF_Label &theLabel)
Objects are created for features automatically.
Definition: Model_AttributeSelectionList.cpp:427
virtual bool isInitialized()
Returns true if attribute was initialized by some value.
Definition: Model_AttributeSelectionList.cpp:419
virtual const std::string selectionType() const
The type of all elements selection.
Definition: Model_AttributeSelectionList.cpp:367
Attribute that contains reference to the sub-shape of some result, the selected shape.
Definition: Model_AttributeSelection.h:40
General object of the application that allows to get/set attributes from the document and compute res...
Definition: Model_Data.h:62