1 // File: ModelAPI_AttributeSelection.h
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_AttributeSelection_H_
6 #define ModelAPI_AttributeSelection_H_
8 #include "ModelAPI_Attribute.h"
9 #include <ModelAPI_Result.h>
11 /**\class ModelAPI_AttributeSelection
13 * \brief Attribute that contains reference to the sub-shape of some result, the selected shape.
16 class ModelAPI_AttributeSelection : public ModelAPI_Attribute
19 /// Defines the result and its selected sub-shape
20 virtual void setValue(
21 const ResultPtr& theContext, const boost::shared_ptr<GeomAPI_Shape>& theSubShape) = 0;
23 /// Returns the selected subshape
24 virtual boost::shared_ptr<GeomAPI_Shape> value() = 0;
26 /// Returns the context of the selection (the whole shape owner)
27 virtual ResultPtr context() = 0;
29 /// Returns the type of this class of attributes
30 static std::string type()
35 /// Returns the type of this class of attributes, not static method
36 virtual std::string attributeType()
41 /// To virtually destroy the fields of successors
42 virtual ~ModelAPI_AttributeSelection()
47 /// Objects are created for features automatically
48 MODELAPI_EXPORT ModelAPI_AttributeSelection()