Salome HOME
Merge remote-tracking branch 'origin/Dev_0.6'
[modules/shaper.git] / src / ModelAPI / ModelAPI_Result.h
1 // File:        ModelAPI_Result.hxx
2 // Created:     07 Jul 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef ModelAPI_Result_H_
6 #define ModelAPI_Result_H_
7
8 #include "ModelAPI_Object.h"
9 #include <GeomAPI_Shape.h>
10
11 class ModelAPI_Feature;
12
13 /**\class ModelAPI_Result
14  * \ingroup DataModel
15  * \brief The result of a feature.
16  *
17  * A generic class that .
18  */
19 class ModelAPI_Result : public ModelAPI_Object
20 {
21   bool myIsConcealed; ///< the result is concealed from the data tree (referenced by other objects)
22  public:
23    /// Returns true if the result is concealed from the data tree (referenced by other objects)
24   inline bool isConcealed() {return myIsConcealed;}
25
26   /// Returns true if the result is concealed from the data tree (referenced by other objects)
27   inline void setIsConcealed(const bool theValue) {myIsConcealed = theValue;}
28
29   /// To virtually destroy the fields of successors
30   virtual ~ModelAPI_Result()
31   {
32   }
33
34   /// Returns the shape-result produced by this feature (or null if no shapes)
35   virtual std::shared_ptr<GeomAPI_Shape> shape() {return std::shared_ptr<GeomAPI_Shape>();}
36 };
37
38 //! Pointer on feature object
39 typedef std::shared_ptr<ModelAPI_Result> ResultPtr;
40
41 #endif