Salome HOME
Make result part as a container of the document
[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_HeaderFile
6 #define ModelAPI_ResultPart_HeaderFile
7
8 #include "ModelAPI_Result.h"
9
10 /**\class ModelAPI_ResultPart
11  * \ingroup DataModel
12  * \brief The Part document, result of a creation of new part feature.
13  *
14  * This result leaves without feature: no parametricity for this element,
15  * only add/remove, undo/redo.
16  */
17 class ModelAPI_ResultPart : public ModelAPI_Result
18 {
19 public:
20   /// Returns the group identifier of this result
21   virtual std::string groupName()
22     { return group(); }
23
24   /// Returns the group identifier of this result
25   static std::string group()
26     {static std::string MY_GROUP = "Parts"; return MY_GROUP;}
27
28   /// part document reference attribute
29   inline static const std::string& DOC_REF()
30   {
31     static const std::string MY_DOC_REF("PartDocument");
32     return MY_DOC_REF;
33   }
34
35   /// Returns the part-document of this result
36   virtual boost::shared_ptr<ModelAPI_Document> partDoc() = 0;
37 };
38
39 //! Pointer on feature object
40 typedef boost::shared_ptr<ModelAPI_ResultPart> ResultPartPtr;
41
42 #endif