]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelAPI/ModelAPI_ResultCompSolid.h
Salome HOME
4a0efd6fc6fbbcf79ff1fefc17121961afd6b136
[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_Result
21 {
22 public:
23   MODELAPI_EXPORT virtual ~ModelAPI_ResultCompSolid();
24   /// Returns the group identifier of this result
25   MODELAPI_EXPORT virtual std::string groupName();
26
27   /// Returns the group identifier of this result
28   inline static std::string group()
29   {
30     static std::string MY_GROUP = "Bodies";
31     return MY_GROUP;
32   }
33
34   /// Returns the feature is disabled or not.
35   MODELAPI_EXPORT virtual bool isDisabled() const;
36
37   /// Adds result to the sketch and to its document
38   /// \param theIndex an index of the created body result in the compsolid
39   virtual std::shared_ptr<ModelAPI_ResultBody> addResult(const int theIndex) = 0;
40
41   /// Returns the number of sub-elements
42   virtual int numberOfSubs(bool forTree = false) const = 0;
43
44   /// Returns the sub-result by zero-base index
45   virtual std::shared_ptr<ModelAPI_ResultBody> subResult(const int theIndex,
46                                                          bool forTree = false) const = 0;
47
48   /// Returns the sub-feature unique identifier in this composite feature by zero-base index
49   //virtual int subResultId(const int theIndex) const = 0;
50
51   /// Returns true if feature or reuslt belong to this composite feature as subs
52   virtual bool isSub(ObjectPtr theObject) const = 0;
53
54   /// This method to inform that sub-feature is removed and must be removed from the internal data
55   /// structures of the owner (the remove from the document will be done outside just after)
56   virtual void removeResult(std::shared_ptr<ModelAPI_ResultBody> theResult) = 0;
57
58 protected:
59 };
60
61 //! Pointer on feature object
62 typedef std::shared_ptr<ModelAPI_ResultCompSolid> ResultCompSolidPtr;
63
64 #endif