Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / Model / Model_Iterator.cxx
index ae62fa928d37acc908da3989b0e1a9a163b0cb7c..4e2cf09422e38ff824874185903bd65301719f17 100644 (file)
@@ -4,6 +4,8 @@
 
 #include "Model_Iterator.h"
 #include "Model_Document.h"
+#include "ModelAPI_Feature.h"
+#include "Model_Object.h"
 #include <TDataStd_Comment.hxx>
 #include <TDataStd_Name.hxx>
 
@@ -49,6 +51,14 @@ int Model_Iterator::numIterationsLeft()
   return aResult;
 }
 
+bool Model_Iterator::is(std::shared_ptr<ModelAPI_Feature> theFeature)
+{
+  return myIter.Value()->Label() == 
+    dynamic_pointer_cast<Model_Object>(theFeature->data())->label();
+
+}
+
+
 Model_Iterator::Model_Iterator(std::shared_ptr<Model_Document> theDoc, TDF_Label theLab)
   : myDoc(theDoc), myIter(theLab, TDataStd_Comment::GetID(), Standard_False)
 {}