]> SALOME platform Git repositories - modules/shaper.git/blob - src/Model/Model_ResultPart.h
Salome HOME
Define color for part result
[modules/shaper.git] / src / Model / Model_ResultPart.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_ResultPart.hxx
4 // Created:     07 Jul 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef Model_ResultPart_H_
8 #define Model_ResultPart_H_
9
10 #include "Model.h"
11 #include <ModelAPI_ResultPart.h>
12
13 /**\class Model_ResultPart
14  * \ingroup DataModel
15  * \brief The Part document, result of a creation of new part feature.
16  *
17  * This result leaves without feature: no parametricity for this element,
18  * only add/remove, undo/redo.
19  */
20 class Model_ResultPart : public ModelAPI_ResultPart
21 {
22  public:
23   /// Returns the part-document of this result
24   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> partDoc();
25   /// Part has no stored feature: this method returns NULL
26   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> owner();
27
28   /// Sets this document as current and if it is not loaded yet, loads it
29   MODEL_EXPORT virtual void activate();
30
31   /// disable all feature of the part on disable of the part result
32   MODEL_EXPORT virtual bool setDisabled(std::shared_ptr<ModelAPI_Result> theThis,
33     const bool theFlag);
34
35   /// Result shape of part document is compound of bodies inside of this part
36   MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape();
37
38   /// Returns the parameters of color definition in the resources config manager
39   MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
40                                             std::string& theDefault);
41
42 protected:
43   /// makes a result on a temporary feature (an action)
44   Model_ResultPart();
45
46   /// Sets the data manager of an object (document does), here also attributes are initialized
47   virtual void setData(std::shared_ptr<ModelAPI_Data> theData);
48
49   /// Returns true if document is activated (loaded into the memory)
50   virtual bool isActivated();
51
52   friend class Model_Objects;
53 };
54
55 #endif