From: adv Date: Thu, 9 Jan 2014 10:22:11 +0000 (+0000) Subject: Adding of list of shapes method added. X-Git-Tag: BR_hydro_v_0_8~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=93b0e81b39a2c0afe6972522eb2bb2bb3a1f0beb;p=modules%2Fhydro.git Adding of list of shapes method added. --- diff --git a/src/HYDROData/HYDROData_ShapesGroup.cxx b/src/HYDROData/HYDROData_ShapesGroup.cxx index 7942fdf0..237059c0 100644 --- a/src/HYDROData/HYDROData_ShapesGroup.cxx +++ b/src/HYDROData/HYDROData_ShapesGroup.cxx @@ -6,6 +6,9 @@ #include #include +#include +#include + #include #include @@ -53,6 +56,18 @@ void HYDROData_ShapesGroup::SetShapes( const TopTools_SequenceOfShape& theShapes } } +void HYDROData_ShapesGroup::SetShapes( const TopTools_ListOfShape& theShapes ) +{ + RemoveShapes(); + + TopTools_ListIteratorOfListOfShape anIter( theShapes ); + for ( ; anIter.More(); anIter.Next() ) + { + const TopoDS_Shape& aShape = anIter.Value(); + AddShape( aShape ); + } +} + void HYDROData_ShapesGroup::GetShapes( TopTools_SequenceOfShape& theShapes ) const { theShapes.Clear(); diff --git a/src/HYDROData/HYDROData_ShapesGroup.h b/src/HYDROData/HYDROData_ShapesGroup.h index 798437b2..8d6a1948 100644 --- a/src/HYDROData/HYDROData_ShapesGroup.h +++ b/src/HYDROData/HYDROData_ShapesGroup.h @@ -7,6 +7,7 @@ #include class TopoDS_Shape; +class TopTools_ListOfShape; DEFINE_STANDARD_HANDLE(HYDROData_ShapesGroup, HYDROData_Entity) @@ -56,6 +57,11 @@ public: */ HYDRODATA_EXPORT virtual void SetShapes( const TopTools_SequenceOfShape& theShapes ); + /** + * Sets new list of shapes for the group. + */ + HYDRODATA_EXPORT virtual void SetShapes( const TopTools_ListOfShape& theShapes ); + /** * Returns all shapes of the group. */