]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/ModelHighAPI_Selection.h
Salome HOME
a3970046576f8523a85adbacd2124d7800458062
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Selection.h
1 // Name   : ModelHighAPI_Selection.h
2 // Purpose: 
3 //
4 // History:
5 // 06/06/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_
9
10 //--------------------------------------------------------------------------------------
11 #include <memory>
12 #include <string>
13 #include <utility>
14
15 #include <boost/variant.hpp>
16 //--------------------------------------------------------------------------------------
17 class GeomAPI_Shape;
18 class ModelAPI_AttributeSelection;
19 class ModelAPI_Result;
20 //--------------------------------------------------------------------------------------
21 typedef std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> > ResultSubShapePair;
22 typedef std::pair<std::string, std::string> TypeSubShapeNamePair;
23 //--------------------------------------------------------------------------------------
24 /**\class ModelHighAPI_Selection
25  * \ingroup CPPHighAPI
26  * \brief Class for filling ModelAPI_AttributeSelection
27  */
28 class ModelHighAPI_Selection
29 {
30 public:
31   /// Constructor for result and sub-shape
32   ModelHighAPI_Selection(const std::shared_ptr<ModelAPI_Result>& theContext = std::shared_ptr<ModelAPI_Result>(),
33                          const std::shared_ptr<GeomAPI_Shape>& theSubShape = std::shared_ptr<GeomAPI_Shape>());
34   /// Constructor for sub-shape by the textual Name
35   ModelHighAPI_Selection(const std::string& theType,
36                          const std::string& theSubShapeName);
37   /// Destructor
38   virtual ~ModelHighAPI_Selection();
39
40   /// Fill attribute values
41   virtual void fillAttribute(std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute) const;
42
43 private:
44   boost::variant<ResultSubShapePair, TypeSubShapeNamePair> myValue;
45 };
46
47 //--------------------------------------------------------------------------------------
48 //--------------------------------------------------------------------------------------
49 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_ */