]> SALOME platform Git repositories - modules/shaper.git/blob - src/FeaturesPlugin/FeaturesPlugin_Group.cpp
Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Group.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesPlugin_Group.cpp
4 // Created:     08 Oct 2014
5 // Author:      Sergey BELASH
6
7 #include "FeaturesPlugin_Group.h"
8
9 #include <ModelAPI_Data.h>
10 #include <ModelAPI_Document.h>
11 #include <ModelAPI_AttributeInteger.h>
12 #include <ModelAPI_AttributeString.h>
13 #include <ModelAPI_AttributeSelectionList.h>
14 #include <ModelAPI_ResultGroup.h>
15
16
17 using namespace std;
18
19 FeaturesPlugin_Group::FeaturesPlugin_Group()
20 {
21 }
22
23 void FeaturesPlugin_Group::initAttributes()
24 {
25   //data()->addAttribute(FeaturesPlugin_Group::NAME_ID(), ModelAPI_AttributeString::type());
26   data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::type());
27 }
28
29 void FeaturesPlugin_Group::execute()
30 {
31   if (results().empty()) { // just create result if not exists
32     ResultPtr aGroup = document()->createGroup(data());
33     setResult(aGroup);
34   }
35 }