]> SALOME platform Git repositories - modules/shaper.git/blob - src/Model/Model_ResultCompSolid.h
Salome HOME
Compsolid result interface.
[modules/shaper.git] / src / Model / Model_ResultCompSolid.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        Model_ResultCompSolid.h
4 // Created:     20 Jul 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef Model_ResultCompSolid_H_
8 #define Model_ResultCompSolid_H_
9
10 #include "Model.h"
11 #include <ModelAPI_ResultCompSolid.h>
12
13 /**\class Model_ResultCompSolid
14  * \ingroup DataModel
15  * \brief The compsolid (container of body results) result of a feature.
16  *
17  * Provides a container of shapes that may be displayed in the viewer.
18  */
19 class Model_ResultCompSolid : public ModelAPI_ResultCompSolid
20 {
21 public:
22   /// Removes the stored builders
23   MODEL_EXPORT virtual ~Model_ResultCompSolid();
24
25   /// Adds result to the sketch and to its document
26   virtual std::shared_ptr<ModelAPI_ResultBody> addResult(std::string theID);
27
28   /// Returns the number of sub-elements
29   virtual int numberOfSubs(bool forTree = false) const;
30
31   /// Returns the sub-result by zero-base index
32   virtual std::shared_ptr<ModelAPI_ResultBody> subResult(const int theIndex,
33                                                          bool forTree = false) const;
34
35   /// Returns the sub-feature unique identifier in this composite feature by zero-base index
36   virtual int subResultId(const int theIndex) const;
37
38   /// Returns true if feature or reuslt belong to this composite feature as subs
39   virtual bool isSub(ObjectPtr theObject) const;
40
41   /// This method to inform that sub-feature is removed and must be removed from the internal data
42   /// structures of the owner (the remove from the document will be done outside just after)
43   virtual void removeResult(std::shared_ptr<ModelAPI_ResultBody> theResult);
44
45 protected:
46   /// Makes a body on the given feature
47   Model_ResultCompSolid();
48
49   friend class Model_Objects;
50 };
51
52 #endif