1 // Name : ModelHighAPI_Tools.h
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_
10 //--------------------------------------------------------------------------------------
11 #include "ModelHighAPI.h"
13 #include <GeomAPI_Shape.h>
18 //--------------------------------------------------------------------------------------
22 //--------------------------------------------------------------------------------------
23 class GeomDataAPI_Dir;
24 class GeomDataAPI_Point;
25 class GeomDataAPI_Point2D;
26 //--------------------------------------------------------------------------------------
27 class ModelAPI_AttributeBoolean;
28 class ModelAPI_AttributeDocRef;
29 class ModelAPI_AttributeDouble;
30 class ModelAPI_AttributeIntArray;
31 class ModelAPI_AttributeInteger;
32 class ModelAPI_AttributeRefAttr;
33 class ModelAPI_AttributeRefAttrList;
34 class ModelAPI_AttributeReference;
35 class ModelAPI_AttributeRefList;
36 class ModelAPI_AttributeSelection;
37 class ModelAPI_AttributeSelectionList;
38 class ModelAPI_AttributeString;
39 class ModelAPI_Object;
40 //--------------------------------------------------------------------------------------
41 class ModelHighAPI_Double;
42 class ModelHighAPI_Integer;
43 class ModelHighAPI_RefAttr;
44 class ModelHighAPI_Selection;
45 //--------------------------------------------------------------------------------------
47 void fillAttribute(const std::shared_ptr<GeomAPI_Pnt2d> & theValue,
48 const std::shared_ptr<GeomDataAPI_Point2D> & theAttribute);
51 void fillAttribute(const std::shared_ptr<GeomDataAPI_Point2D> & theAttribute,
52 double theX, double theY);
55 void fillAttribute(const std::shared_ptr<GeomAPI_Dir> & theValue,
56 const std::shared_ptr<GeomDataAPI_Dir> & theAttribute);
59 void fillAttribute(const std::shared_ptr<GeomAPI_Pnt> & theValue,
60 const std::shared_ptr<GeomDataAPI_Point> & theAttribute);
62 //--------------------------------------------------------------------------------------
64 void fillAttribute(bool theValue,
65 const std::shared_ptr<ModelAPI_AttributeBoolean> & theAttribute);
68 void fillAttribute(const ModelHighAPI_Double & theValue,
69 const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute);
72 void fillAttribute(double theValue,
73 const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute);
76 void fillAttribute(const ModelHighAPI_Integer & theValue,
77 const std::shared_ptr<ModelAPI_AttributeInteger> & theAttribute);
80 void fillAttribute(const ModelHighAPI_RefAttr & theValue,
81 const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute);
84 void fillAttribute(const std::list<ModelHighAPI_RefAttr> & theValue,
85 const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute);
88 void fillAttribute(const std::shared_ptr<ModelAPI_Object> & theValue,
89 const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute);
92 void fillAttribute(const std::list<std::shared_ptr<ModelAPI_Object> > & theValue,
93 const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute);
96 void fillAttribute(const ModelHighAPI_Selection & theValue,
97 const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute);
100 void fillAttribute(const std::list<ModelHighAPI_Selection> & theValue,
101 const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute);
104 void fillAttribute(const std::string & theValue,
105 const std::shared_ptr<ModelAPI_AttributeString> & theAttribute);
107 void fillAttribute(const char * theValue,
108 const std::shared_ptr<ModelAPI_AttributeString> & theAttribute);
111 GeomAPI_Shape::ShapeType shapeTypeByStr(const std::string& theShapeTypeStr);
114 GeomAPI_Shape::ShapeType getShapeType(const ModelHighAPI_Selection& theSelection);
116 //--------------------------------------------------------------------------------------
117 //--------------------------------------------------------------------------------------
118 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_ */