1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_Result.hxx
4 // Created: 07 Jul 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef ModelAPI_Result_H_
8 #define ModelAPI_Result_H_
10 #include "ModelAPI_Object.h"
11 #include <GeomAPI_Shape.h>
13 class ModelAPI_Feature;
15 /**\class ModelAPI_Result
17 * \brief The result of a feature.
19 * A generic class that .
21 class ModelAPI_Result : public ModelAPI_Object
23 bool myIsConcealed; ///< the result is concealed from the data tree (referenced by other objects)
26 /// Reference to the color of the result.
27 /// The integer array is used. It contains tree values for red green and blue values. The values are in
29 inline static const std::string& COLOR_ID()
31 static const std::string MY_COLOR_ID("Color");
35 /// Returns true if the result is concealed from the data tree (referenced by other objects)
36 inline bool isConcealed()
41 /// Returns true if the result is concealed from the data tree (referenced by other objects)
42 inline void setIsConcealed(const bool theValue)
44 myIsConcealed = theValue;
47 // Retuns the parameters of color definition in the resources config manager
48 virtual void colorConfigInfo(std::string& theSection, std::string& theName,
49 std::string& theDefault) {}
51 /// Request for initialization of data model of the result: adding all attributes
52 virtual void initAttributes() {};
54 /// To virtually destroy the fields of successors
55 MODELAPI_EXPORT virtual ~ModelAPI_Result();
57 /// Returns the shape-result produced by this feature (or null if no shapes)
58 MODELAPI_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shape();
60 /// On change of attribute of the result update presentation of this result:
61 /// for the current moment there are only presentation attributes assigned to results
62 MODELAPI_EXPORT virtual void attributeChanged(const std::string& theID);
65 //! Pointer on feature object
66 typedef std::shared_ptr<ModelAPI_Result> ResultPtr;