Salome HOME
Resolve crashes in the release mode under Debian Squeeze linux
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultConstruction.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_ResultConstruction.h
4 // Created:     07 Jul 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef ModelAPI_ResultConstruction_H_
8 #define ModelAPI_ResultConstruction_H_
9
10 #include "ModelAPI_Result.h"
11 #include <GeomAPI_Shape.h>
12
13 #include <string>
14
15 /**\class ModelAPI_ResultConstruction
16  * \ingroup DataModel
17  * \brief The construction element result of a feature.
18  *
19  * Provides a shape that may be displayed in the viewer.
20  * Intermediate, light result that in many cases produces a result on the fly.
21  */
22 class ModelAPI_ResultConstruction : public ModelAPI_Result
23 {
24  public:
25   /// Returns the group identifier of this result
26   MODELAPI_EXPORT virtual std::string groupName();
27
28   /// Returns the group identifier of this result
29   inline static std::string group()
30   {
31     static std::string MY_GROUP = "Construction";
32     return MY_GROUP;
33   }
34
35   /// Sets the result
36   virtual void setShape(std::shared_ptr<GeomAPI_Shape> theShape) = 0;
37
38   /// Sets the flag that it must be displayed in history (default is true)
39   virtual void setIsInHistory(const bool isInHistory) = 0;
40 };
41
42 //! Pointer on feature object
43 typedef std::shared_ptr<ModelAPI_ResultConstruction> ResultConstructionPtr;
44
45 #endif