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
33 VT_ResultSubShapePair,
34 VT_TypeSubShapeNamePair
38 /// Constructor for result and sub-shape
40 ModelHighAPI_Selection(const std::shared_ptr<ModelAPI_Result>& theContext = std::shared_ptr<ModelAPI_Result>(),
41 const std::shared_ptr<GeomAPI_Shape>& theSubShape = std::shared_ptr<GeomAPI_Shape>());
42 /// Constructor for sub-shape by the textual Name
44 ModelHighAPI_Selection(const std::string& theType,
45 const std::string& theSubShapeName);
48 virtual ~ModelHighAPI_Selection();
50 /// Fill attribute values
52 virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute) const;
54 /// Append to list attribute
56 virtual void appendToList(const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute) const;
58 /// \return variant type.
60 virtual VariantType variantType() const;
62 /// \return pair of result and sub-shape.
64 virtual ResultSubShapePair resultSubShapePair() const;
66 /// \return pair of sub-shape type and name.
68 virtual TypeSubShapeNamePair typeSubShapeNamePair() const;
71 VariantType myVariantType;
72 ResultSubShapePair myResultSubShapePair;
73 TypeSubShapeNamePair myTypeSubShapeNamePair;
76 //--------------------------------------------------------------------------------------
77 //--------------------------------------------------------------------------------------
78 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_ */