Salome HOME
2df33884e46b12f74e898415f8ff648c5fbf3b19
[modules/shaper.git] / src / Model / Model_ResultPart.h
1 // File:        ModelAPI_ResultPart.hxx
2 // Created:     07 Jul 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef Model_ResultPart_H_
6 #define Model_ResultPart_H_
7
8 #include "Model.h"
9 #include <ModelAPI_ResultPart.h>
10
11 /**\class ModelAPI_ResultPart
12  * \ingroup DataModel
13  * \brief The Part document, result of a creation of new part feature.
14  *
15  * This result leaves without feature: no parametricity for this element,
16  * only add/remove, undo/redo.
17  */
18 class Model_ResultPart : public ModelAPI_ResultPart
19 {
20  public:
21   /// Returns the part-document of this result
22   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> partDoc();
23   /// Part has no stored feature: this method returns NULL
24   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> owner();
25
26   /// Sets this document as current and if it is not loaded yet, loads it
27   MODEL_EXPORT virtual void activate();
28
29 protected:
30   /// makes a result on a temporary feature (an action)
31   Model_ResultPart();
32
33   /// Sets the data manager of an object (document does), here also attributes are initialized
34   virtual void setData(std::shared_ptr<ModelAPI_Data> theData);
35
36   friend class Model_Document;
37 };
38
39 #endif