1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Group.cpp
4 // Created: 07 June 2016
5 // Author: Dmitry Bobylev
7 #include "FeaturesAPI_Group.h"
9 #include <ModelHighAPI_Integer.h>
10 #include <ModelHighAPI_Selection.h>
11 #include <ModelHighAPI_Tools.h>
13 //==================================================================================================
14 FeaturesAPI_Group::FeaturesAPI_Group(const std::shared_ptr<ModelAPI_Feature>& theFeature)
15 : ModelHighAPI_Interface(theFeature)
20 //==================================================================================================
21 FeaturesAPI_Group::FeaturesAPI_Group(const std::shared_ptr<ModelAPI_Feature>& theFeature,
22 const std::list<ModelHighAPI_Selection>& theGroupList)
23 : ModelHighAPI_Interface(theFeature)
26 setGroupList(theGroupList);
30 //==================================================================================================
31 FeaturesAPI_Group::~FeaturesAPI_Group()
36 //==================================================================================================
37 void FeaturesAPI_Group::setGroupList(const std::list<ModelHighAPI_Selection>& theGroupList)
39 fillAttribute(theGroupList, mygroupList);
44 //==================================================================================================
45 GroupPtr addGroup(const std::shared_ptr<ModelAPI_Document>& thePart,
46 const std::list<ModelHighAPI_Selection>& theGroupList)
48 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Group::ID());
49 return GroupPtr(new FeaturesAPI_Group(aFeature, theGroupList));