Salome HOME
Boost has been removed from code
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultPart.h
1 // File:        ModelAPI_ResultPart.h
2 // Created:     07 Jul 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef ModelAPI_ResultPart_H_
6 #define ModelAPI_ResultPart_H_
7
8 #include "ModelAPI_Result.h"
9
10 #include <string>
11
12 /**\class ModelAPI_ResultPart
13  * \ingroup DataModel
14  * \brief The Part document, result of a creation of new part feature.
15  *
16  * This result leaves without feature: no parametricity for this element,
17  * only add/remove, undo/redo.
18  */
19 class ModelAPI_ResultPart : public ModelAPI_Result
20 {
21  public:
22   /// Returns the group identifier of this result
23   virtual std::string groupName()
24   {
25     return group();
26   }
27
28   /// Returns the group identifier of this result
29   static std::string group()
30   {
31     static std::string MY_GROUP = "Parts";
32     return MY_GROUP;
33   }
34
35   /// part document reference attribute
36   inline static const std::string& DOC_REF()
37   {
38     static const std::string MY_DOC_REF("PartDocument");
39     return MY_DOC_REF;
40   }
41
42   /// Returns the part-document of this result
43   virtual std::shared_ptr<ModelAPI_Document> partDoc() = 0;
44
45   /// Sets this document as current and if it is not loaded yet, loads it
46   virtual void activate() = 0;
47 };
48
49 //! Pointer on feature object
50 typedef std::shared_ptr<ModelAPI_ResultPart> ResultPartPtr;
51
52 #endif