]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelAPI/ModelAPI_ResultBody.h
Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultBody.h
1 // File:        ModelAPI_ResultBody.hxx
2 // Created:     07 Jul 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef ModelAPI_ResultBody_HeaderFile
6 #define ModelAPI_ResultBody_HeaderFile
7
8 #include "ModelAPI_Result.h"
9 #include <GeomAPI_Shape.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 ModelAPI_ResultBody : public ModelAPI_Result
20 {
21 public:
22   /// Returns the group identifier of this result
23   virtual std::string groupName()
24     { return group(); }
25
26   /// Returns the group identifier of this result
27   static std::string group()
28   {static std::string MY_GROUP = "Bodies"; return MY_GROUP;}
29
30   /// Stores the shape (called by the execution method).
31   virtual void store(const boost::shared_ptr<GeomAPI_Shape>& theShape) = 0;
32   /// Returns the shape-result produced by this feature
33   virtual boost::shared_ptr<GeomAPI_Shape> shape() = 0;
34
35   /// To virtually destroy the fields of successors
36   virtual ~ModelAPI_ResultBody() {}
37
38 protected:
39   /// Use plugin manager for features creation: this method is 
40   /// defined here only for SWIG-wrapping
41   ModelAPI_ResultBody()
42   {}
43 };
44
45 //! Pointer on feature object
46 typedef boost::shared_ptr<ModelAPI_ResultBody> ResultBodyPtr;
47
48 #endif