Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into SketchSolver
[modules/shaper.git] / src / ModelAPI / ModelAPI_Object.h
1 // File:        ModelAPI_Object.hxx
2 // Created:     19 May 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef ModelAPI_Object_HeaderFile
6 #define ModelAPI_Object_HeaderFile
7
8 #include "ModelAPI_Feature.h"
9
10 #include <boost/shared_ptr.hpp>
11
12 /**\class ModelAPI_Object
13  * \ingroup DataModel
14  * \brief Represents the result of some feature in the object browser
15  * under the specific folder. Just a reference to specific feature-operation
16  * with possibility to rename it.
17  */
18 class ModelAPI_Object : public ModelAPI_Feature
19 {
20 public:
21
22   /// It is never located in history
23   MODELAPI_EXPORT virtual bool isInHistory() {return false;}
24
25   /// Reference to the feature-operation that produces this object
26   MODELAPI_EXPORT virtual FeaturePtr featureRef() = 0;
27
28   /// Returns the name of this object (by default equal to the name of feature)
29   MODELAPI_EXPORT virtual std::string getName() = 0;
30
31   /// Defines the name of the object
32   MODELAPI_EXPORT virtual void setName(std::string theName) = 0;
33 };
34
35
36 typedef boost::shared_ptr<ModelAPI_Object> ObjectPtr;
37
38 #endif