Salome HOME
Merge branch 'master' into Dev_1.1.0
[modules/shaper.git] / src / Model / Model_ResultGroup.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        Model_ResultGroup.h
4 // Created:     08 Jul 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef Model_ResultGroup_H_
8 #define Model_ResultGroup_H_
9
10 #include "Model.h"
11 #include <ModelAPI_ResultGroup.h>
12
13 /**\class Model_ResultGroup
14  * \ingroup DataModel
15  * \brief The groups result.
16  *
17  * Provides a compound of selected elements, without storage, one the fly.
18  */
19 class Model_ResultGroup : public ModelAPI_ResultGroup
20 {
21   std::shared_ptr<ModelAPI_Data> myOwnerData;  ///< data of owner of this result
22 public:
23   /// default color for a result body
24   inline static const std::string& DEFAULT_COLOR()
25   {
26     static const std::string RESULT_GROUP_COLOR("#E0A01B");
27     return RESULT_GROUP_COLOR;
28   }
29   /// Request for initialization of data model of the result: adding all attributes
30   virtual void initAttributes();
31
32   // Retuns the parameters of color definition in the resources config manager
33   MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
34                                             std::string& theDefault);
35
36   /// Returns the compound of selected entities
37   MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape();
38
39   /// Removes the stored builders
40   MODEL_EXPORT virtual ~Model_ResultGroup() {}
41
42 protected:
43   /// Makes a body on the given feature data
44   Model_ResultGroup(std::shared_ptr<ModelAPI_Data> theOwnerData);
45
46   friend class Model_Document;
47 };
48
49 #endif