Salome HOME
678594277e0cb408e3f2f4838bdf09647e4b6787
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultCompSolid.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_ResultCompSolid.hxx
4 // Created:     20 Jul 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef ModelAPI_ResultCompSolid_H_
8 #define ModelAPI_ResultCompSolid_H_
9
10 #include "ModelAPI_Result.h"
11 #include "ModelAPI_ResultBody.h"
12 #include <string>
13
14 /**\class ModelAPI_ResultCompSolid
15 * \ingroup DataModel
16 * \brief The comp solid (container of results) result of a feature.
17 *
18 * Provides a conainer of body result that may be displayed in the viewer.
19 */
20 class ModelAPI_ResultCompSolid : public ModelAPI_ResultBody
21 {
22 public:
23   MODELAPI_EXPORT virtual ~ModelAPI_ResultCompSolid();
24   /// Returns the group identifier of this result
25
26   /// Returns the number of sub-elements
27   virtual int numberOfSubs(bool forTree = false) const = 0;
28
29   /// Returns the sub-result by zero-base index
30   virtual std::shared_ptr<ModelAPI_ResultBody> subResult(const int theIndex,
31                                                          bool forTree = false) const = 0;
32
33   /// Returns true if feature or reuslt belong to this composite feature as subs
34   virtual bool isSub(ObjectPtr theObject) const = 0;
35
36   /// Set displayed flag to the result and all sub results
37   /// \param theDisplay a boolean value
38   MODELAPI_EXPORT virtual void setDisplayed(const bool theDisplay);
39
40 protected:
41 };
42
43 //! Pointer on feature object
44 typedef std::shared_ptr<ModelAPI_ResultCompSolid> ResultCompSolidPtr;
45
46 #endif