Salome HOME
08ce28ab0cd88aafb8226f1b7cccc4d0a4903671
[modules/shaper.git] / src / Model / Model_ResultBody.h
1 // File:        Model_ResultBody.h
2 // Created:     08 Jul 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef Model_ResultBody_H_
6 #define Model_ResultBody_H_
7
8 #include "Model.h"
9 #include <ModelAPI_ResultBody.h>
10
11 /**\class ModelAPI_ResultBody
12  * \ingroup DataModel
13  * \brief The body (shape) result of a feature.
14  *
15  * Provides a shape that may be displayed in the viewer.
16  * May provide really huge results, so, working with this kind
17  * of result must be optimized.
18  */
19 class Model_ResultBody : public ModelAPI_ResultBody
20 {
21   boost::shared_ptr<ModelAPI_Feature> myOwner;  ///< owner of this result
22  public:
23   /// Stores the shape (called by the execution method).
24   MODEL_EXPORT virtual void store(const boost::shared_ptr<GeomAPI_Shape>& theShape);
25   /// Returns the shape-result produced by this feature
26   MODEL_EXPORT virtual boost::shared_ptr<GeomAPI_Shape> shape();
27   /// Returns the source feature of this result
28   MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Feature> owner();
29
30  protected:
31   /// Makes a body on the given feature
32   Model_ResultBody();
33
34   friend class Model_Document;
35 };
36
37 #endif