1 // Name : ModelHighAPI_Selection.h
5 // 06/06/16 - Sergey POKHODENKO - Creation of the file
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_
10 //--------------------------------------------------------------------------------------
11 #include "ModelHighAPI.h"
16 //--------------------------------------------------------------------------------------
18 class ModelAPI_AttributeSelection;
19 class ModelAPI_AttributeSelectionList;
20 class ModelAPI_Result;
21 //--------------------------------------------------------------------------------------
22 typedef std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> > ResultSubShapePair;
23 typedef std::pair<std::string, std::string> TypeSubShapeNamePair;
24 //--------------------------------------------------------------------------------------
25 /**\class ModelHighAPI_Selection
27 * \brief Class for filling ModelAPI_AttributeSelection
29 class ModelHighAPI_Selection
34 VT_ResultSubShapePair,
35 VT_TypeSubShapeNamePair
39 /// Default constructor with empty selection.
41 ModelHighAPI_Selection();
43 /// Constructor for result and sub-shape
45 ModelHighAPI_Selection(const std::shared_ptr<ModelAPI_Result>& theContext,
46 const std::shared_ptr<GeomAPI_Shape>& theSubShape = std::shared_ptr<GeomAPI_Shape>());
47 /// Constructor for sub-shape by the textual Name
49 ModelHighAPI_Selection(const std::string& theType,
50 const std::string& theSubShapeName);
53 virtual ~ModelHighAPI_Selection();
55 /// Fill attribute values
57 virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute) const;
59 /// Append to list attribute
61 virtual void appendToList(const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute) const;
63 /// \return variant type.
65 virtual VariantType variantType() const;
67 /// \return pair of result and sub-shape.
69 virtual ResultSubShapePair resultSubShapePair() const;
71 /// \return pair of sub-shape type and name.
73 virtual TypeSubShapeNamePair typeSubShapeNamePair() const;
75 /// \return shape type.
77 virtual std::string shapeType() const;
80 VariantType myVariantType;
81 ResultSubShapePair myResultSubShapePair;
82 TypeSubShapeNamePair myTypeSubShapeNamePair;
85 //--------------------------------------------------------------------------------------
86 //--------------------------------------------------------------------------------------
87 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_ */